In my opinion, anything that touch compiled packages like pytorch should be packaged with conda/mamba on conda-forge. I found it is the only package manager for python which will reliably detect my hardware and install the correct version of every dependency.
How I solved PyTorch's cross-platform nightmare
21–30 of 30 posts
Re: How I solved PyTorch's cross-platform nightmare
#22> Setting up a Python project that relies on PyTorch, so that it works across different accelerators and operating systems, is a nightmare. I would like to add some anecdata to this. When I was a PhD student, I already had 12 years of using and administrating Linuxes as my personal OS, and I'd already had my share of package manager and dependency woes. But managing Python, PyTorch, and CUDA dependencies were relativ…
Re: How I solved PyTorch's cross-platform nightmare
#23Re: How I solved PyTorch's cross-platform nightmare
#24Re: How I solved PyTorch's cross-platform nightmare
#25Check out https://github.com/tracel-ai/burn project! It makes deploying models across different platforms easy. It uses Rust instead of Python.
That's why people will go stupid lengths to convert model from PyTorch / TensorFlow with onnxtools / coremltools to avoid touch the model / weights themselves.
The only one that escaped this is llama.cpp, which weirdly, despite the difficulty of model conversion with ggml, people seem to do it anyway.
Re: How I solved PyTorch's cross-platform nightmare
#26This ends up wasting space and slowing down installation :(
Speaking of PyTorch and CUDA, I wish the Vulkan backend becomes stable, but that seems to super far dream...
https://docs.pytorch.org/executorch/stable/backends-vulkan.h...
Re: How I solved PyTorch's cross-platform nightmare
#27> Setting up a Python project that relies on PyTorch, so that it works across different accelerators and operating systems, is a nightmare. I would like to add some anecdata to this. When I was a PhD student, I already had 12 years of using and administrating Linuxes as my personal OS, and I'd already had my share of package manager and dependency woes. But managing Python, PyTorch, and CUDA dependencies were relativ…
How well do you read in your dreams? Do you read full outputs or just diffrentiate between a green [OK] status and stack traces?
But the point is more that, for me, this is a somewhat rare instance where I think using the term "nightmare" in the title is justified.
Re: How I solved PyTorch's cross-platform nightmare
#28> Setting up a Python project that relies on PyTorch, so that it works across different accelerators and operating systems, is a nightmare. I would like to add some anecdata to this. When I was a PhD student, I already had 12 years of using and administrating Linuxes as my personal OS, and I'd already had my share of package manager and dependency woes. But managing Python, PyTorch, and CUDA dependencies were relativ…
> When I was a PhD student, I already had 12 years of using and administrating Linuxes as my personal OS, and I'd already had my share of package manager and dependency woes.
I'm in a very similar boat (just defended a few months ago).More than once I had installed pytorch into a new environment and subsequently spent hours trying to figure out why things suddenly aren't working. Turns out, PyTorch had just uploaded a bad wheel.
Weirdly I feel like CUDA has become easier yet Python has become worse. It's all package management. Honestly, I find myself wanting to use package managers less and less because of Python. Of course `pip install` doesn't work, and that is probably a good thing. But the result of this is that any time you install a package it adds the module as a system module, which I thought was the whole thing we were trying to avoid. So what? Do I edit every package build now so that it runs a uv venv? If I do that, then this seems to just get more complicated as I have to keep better track of my environments. I'd rather be dealing with environment modules than that. I'd rather things be rapped up in a systemd service or nspawn than that!
I mean I just did a update and upgrade and I had 13 python packages and 193 haskell modules, out of 351 packages! This shit is getting insane.
People keep telling me to keep things simple, but I don't think any of this is simple. It really looks like a lot of complexity created by a lot of things being simplified. I mean isn't every big problem created out of a bunch of little problems? That's how we solve big problems -- break them down to small problems -- right? Did we forget the little things matter? If you don't think they do, did you question if this comment was written by an LLM because I used a fucking em dash? Seems like you latched onto something small. I think it is hard to know when the little things matter or don't matter, often we just don't realize the little things are part of the big things.
Re: How I solved PyTorch's cross-platform nightmare
#29> Setting up a Python project that relies on PyTorch, so that it works across different accelerators and operating systems, is a nightmare. I would like to add some anecdata to this. When I was a PhD student, I already had 12 years of using and administrating Linuxes as my personal OS, and I'd already had my share of package manager and dependency woes. But managing Python, PyTorch, and CUDA dependencies were relativ…
How well do you read in your dreams? Do you read full outputs or just diffrentiate between a green [OK] status and stack traces?
Re: How I solved PyTorch's cross-platform nightmare
#30In my opinion, anything that touch compiled packages like pytorch should be packaged with conda/mamba on conda-forge. I found it is the only package manager for python which will reliably detect my hardware and install the correct version of every dependency.
Try pixi! Pixi is a much more sane way for building with conda + pypi packages in a single tool that makes this so much easier for torch development, regardless if you get the condaforge or pypi builds of pytorch. https://pixi.sh/latest/
In the comparative table, they claim that conda doesn't support:
* lock file: which is false, you can freeze your environment
* task runner: I don't need my package manager to be a task runner
* project management: You can do 1 env per project ? I don't see the problem here...
So no, please, just use conda/mamba and conda-forge.