Curious why and how you did the transition? Rapid progress in this space I don't think SWE is a viable career for next 20 years.
I really enjoyed the research I did in my undergraduate degree (Physics) and so when my partner suggested I apply to the doctoral training program (it's called a CDT in England) it was sort of a no brainer to shoot my shot - the project sounded interesting and the course was designed for those coming from industry.
tl;dr opportunity came up and I jumped ship from SWE to ML research.