Tax filing when moving to Canada

I was working in the US on Stem opt (F1 Visa) and moved to Canada (for work in same company) after my visa expired in October 2019. I also have a wife who is on dependent visa (F2) and a kid who is US citizen. My question is what all forms do I need to file. Last year I was in US throughout the year and I filed 1040 form with “married filing jointly” and adding kid as a dependent. But I’m not sure how tax filing would work this year since I’m resident alien till October 2019 and then no longer staying in US from November to December.