I am in my 3rd year of the PhD program in theoretical physics. Although I would love to stay within academia, my hopes of obtaining a good position are dwindling because of various factors. Given that, it seems wise to be get prepared to leave academia after I get a PhD. My work has nothing to do with coding/programming, and I have zero experience at that. If I leave academia, I want to get into the field of data science/machine learning. Is it possible/advisable/reasonable to work on a side project within physics but in an unrelated field which allows me to gain experience in data analysis and programming? Would I be able to handle it? Would it be a reasonable thing to do without upsetting my advisor? Also, if I do intend to stay within academia, would the experience of working in a different field count, even though it doesn't appear in my dissertation at all?
I do want to mention that I am certain that I do not want to change my field of research for my dissertation just because of the possibility of moving away from academia. I really enjoy working in my field and wouldn't give that up for anything. So switching to the other field for good is not an option.
Thanks in advance!
Edit: I could also work on problems that are a little more closely related with my work that involves numerical computation through which I could learn to code but I wouldn't be working with data. However, I don't know if that would help in terms of getting into industry.