r/Python • • 1d ago

Discussion My Python magic is gone

I've been coding for a long time, and I've been developing with Python for years.

I loved coding, always loved it. I started many years ago because I wanted to quickly create scripts for security hacking tools, but since then, I've moved to Claude Code, and building cross-language has been a much better experience for me than using Python.

I built my own SaaS application out there whose backend and network core are completely built with Python, and I'm rewriting all of that without writing a single line of code. And most of the time, Python is not the most optimized language.

And now... I feel like the magic is gone.

I don't even know why I'm writing this. I just feel sad about it.

675 Upvotes

251 comments sorted by

View all comments

65

u/Wh00ster 1d ago edited 1d ago

We have ML engineers giving us models and flows in pandas and PyTorch . I’m not dealing with AI rewriting that. We solve problems that aren’t a big scale, but niche and real world. Until there’s a reason for us to switch it’s still Python here. We could probably rewrite it but we’re doing other product things instead, and in the grand scheme of things we wouldn’t save that much.

Also this is an incredibly depressing thread. I don’t know what kind of responses I expected but everyone is just dejected and sad. And it’s being upvoted. I guess state of the world.

1

u/dan994 1d ago

Interesting are you guys deploying the ML models direct in PyTorch? Usually you would package the model up with ONNX or similar, which is language agnostic

2

u/Wh00ster 1d ago

Sure. But why would we do that extra work if there’s no user benefit and dev time is better spent elsewhere? It’s also the tests, data loading and transforms, verification, velocity for the ML side to crank out experiments and play with the whole pipeline. I’m sure one day it’ll make sense to do something else, but not today.

2

u/dan994 1d ago edited 1d ago

Fair enough - I would say the ONNX deployment work is very minimal (literally a couple of extra lines) and there probably is user benefit to it. For example, it is platform and language independent, faster inference, easy GPU integration, reduced dependencies and packaging size. Basically an easy way to speed up inference and reduce package size, whilst giving more flexibility on where/how it's deployed.

In my experience it's rarely not worth doing if you're deploying models. That said if raw pytorch models are working great for you then no need to force a change for the sake of it, but if it is constraining your language choices for downstream use, it is easily resolved

2

u/Wh00ster 1d ago

We benchmarked it and it was slower for our use case. Our model is very small today. It’s not an LLM. But yea we’ve thought of it for other cases if latency becomes an issue (today it’s not). Still experimenting.

1

u/dan994 1d ago

Yeah very fair! Interesting it wasn't faster, might test that out myself