Why are you doing a PhD in physics if you don't want to do research in physics? A PhD in physics won't "stifle" your ability to get jobs you want. The thing that will "stifle" your ability to get jobs you want is not having the relevant skills or not being able to play the game of interviewing.
E.g. I interviewed a physicist for a data science position. While he had worked on a lot of problems which could be categorized as data science problems, 95% of the problems he was working had one specific tool that he used, Principal Component Analysis. It was kind of hard to get him to think of another ways of solving a problem.
Part of the reason I'm doing a PhD in physics is, of course, because I enjoy the work. Everyday I come in and I always feel like I have something to learn from the people I work with. I feel like I grow as a person because I'm constantly learning new things from my peers - whether that be something purely theoretical, hands-on electronics work, cleanroom work, machine shop work, optics work, or, yes, coding. Could the same be true in industry? Absolutely. Is it nearly as guaranteed? I'm sure not. I definitely have friends that are starting to gain the golden handcuffs at their companies, and they've only been working for 2 years.
Moreover, I don't think it's fair to say that people waste their time doing a PhD in physics. Sure, they could be learning a lot more job-specific skills, but the point is that the people who do a PhD in physics absolutely have the ability to learn those things. I'm sure if the physicist used PCA it wouldn't take him long to learn plenty of other ML techniques. I think the skills you learn during a PhD aren't as simple as just listing out the technical things you became familiar with. (Still, I'm certainly considering leaving grad school, but I don't think it's an obvious decision.)
Of course, I think there is a lot more to a job than the technical skills you bring to the table --- your ability to communicate, your understanding of the market & product, and your ability to work well with others. (Yes, I'm fully aware physics people don't often hold gold medals in these categories). I think that doing an internship could help in these respects, and it's why I'm interested in doing one.
> Moreover, I don't think it's fair to say that people waste their time doing a PhD in physics. Sure, they could be learning a lot more job-specific skills, but the point is that the people who do a PhD in physics absolutely have the ability to learn those things. I'm sure if the physicist used PCA it wouldn't take him long to learn plenty of other ML techniques.
I sympathize with your situation as someone who accidentally got into computer science. As much as I have tried to portray myself as a fast learner or someone who can learn on the job, a secret in Industry that I have learnt is that very few people care. Most managers are looking for someone who can fit a resource need yesterday. To illustrate: the other day I was talking to a recruiter from BigCo, the recruiter strongly suggested that I write code on the whiteboard in an actual programming language rather than pseudo-code. This seemed strange because BigCo is known for their algorithm intensive interviews. Then, I was talking to a friend who works for BigCo2 and it all made sense: if there are two candidates A and B, of whom you can hire only one and both A and B solve the algorithm but B appears to be able to write the code with very few mistakes on the board, you are probably going to hire B mainly because B appears to fit the hole in your organization. Now, as much as people like to protest they are not like that, companies are hierarchies of managers, managers who have concerns and reports to file. The physicist who used PCA would probably have been able to learn everything else in 6 months. Who is going to spend six months paying him a shit ton of money while he learns or maybe doesn't? I am not saying everyone who gets hired is hired with an expectation of being productive from day 1 but you have to be productive sooner than later.
Ultimately what am I saying? If you are thinking of going into industry; get real. Get all the skills necessary, your resume in order. There will be millions of blog posts bemoaning the disconnect between industry and PhD or how the interview process is broken. However, all that fluffy bullshit is not going to bring a paycheck down the line. What is going to get you interviews is having "good internships", code on Github. What is going to get you a job is the ability to convince a collection of random people that you are worthy of getting a job. Sure, the stochastic nature of the game means there will be some moron who thinks that him dropping out of high school and spending the last five years writing spaghetti code for industry makes him superior to you. Or you may have an attitude that you spending five years writing research papers makes you better. Ultimately, all that doesn't matter.
When I was in grad. school, I thought the idea of doing a PhD was to train for a lifetime of contributing to human knowledge. Not a lot of PhD theses end up as a contribution to human knowledge. Sure, there are the 1% that do, those people don't typically have the problem of not being "able to continue contributing."
Agreed. You get a PhD for you, not for science. I would hazard 99% of PhD dissertations get read cover to cover less than 5 times. And I'm including the committee and author on that number.
That is, broadly, the ideal. Your PhD thesis is your first masterwork that qualifies you to call yourself a real researcher, and you go on to do many more along the length of your career.
In actual fact these days, there simply isn't a career model set up to support that anymore. Your PhD thesis is now supposed to qualify you for your first postdoc, your first postdoc or two qualify you for a permanent position, and you earn tenure or permanent contract in your permanent position, and then you can just focus on contributing to knowledge rather than on careerism.
I am currently working on my PhD Biomedical Engineering (3 years in), and I have mixed feelings on this. Certainly most PhD dissertations are a joke, but during the first few years of a PhD you are acting as the arms and legs of your professor, who, if they are any good, is capable of pushing forward human knowledge using you as an "instrument".
E.g. I interviewed a physicist for a data science position. While he had worked on a lot of problems which could be categorized as data science problems, 95% of the problems he was working had one specific tool that he used, Principal Component Analysis. It was kind of hard to get him to think of another ways of solving a problem.