T-Mobile's T&C say a majority of your usage must be on T-Mobile's network. I don't know if there's an official definition of "majority" and a timeframe, but rumors are at least half your time every six months have to be on T-Mobile's network? I also don't know if this is strictly data or combination data and phone or what.
But, if you're roaming on a Canadian network and using data passes, if a majority of your usage isn't on T-Mobile's network, that's grounds for terminating an account.
I don't know what kind of warning they give.
Some people do convert to PAYG plans and add funds every 80ish days (the expiration is 90) to keep the account alive. Their phone is sitting in a dresser drawer or something until they return to the States. There's also WiFi Calling if you're expecting calls on that line. But, they're definitely not using data passes.
smplyunprdctble gave a great reply so I'm just here to backup what's already been said. The majority usage does need to be in the U.S. I don't wanna try to give you specific time frame, but if you know you're gonna be using the service in Canada, I don't have a suggestion on setting up a line of service with us.