Hacker News new | ask | show | jobs
by aurbano 1104 days ago
We recently migrated to Poetry [1] for dependency management and so far it's been a breath of fresh air - it feels like what Python deps should've always been!

You can even have dependency groups, to separate main/dev dependencies for instance. It also brings env management, and plays very nicely with Docker if you use containers.

[1] https://python-poetry.org

2 comments

Poetry doesn't really work well if you try to ssh in. It tries to setup a keyring for some reason whenever you use it, but even if just to Runa project. I feel like it shouldn't be that hard to get going, but after trying to hack it for four hour I used a workaround of telling the keyrings to use a null provider & then was able to download deps & run the project I'd downloaded.

Admittedly only a single nit but it was still one of thr saddest most frustrating python experiences I've ever had.

Good luck using poetry for GPU accelerated ML dependencies
poetry add maps to pip install, and you can get cuda based modules with pip, so what's the problem?
It doesn't support the -f option of Pip, which is non-standard but used by many ML dependencies.
you mean like this?

    wtf = { file = "omg.whl" }
It's not reasonable to expect the end user to figure out the correct toolchain triple URL there are so many os-driver-framework version combinations.

https://download.pytorch.org/whl/torch/

It's meant to be an automated process, don't make excuses for poor implementation on behalf of Poetry.

See for yourself the number of torch related issues:

https://github.com/python-poetry/poetry/issues?q=is%3Aissue+...

https://github.com/python-poetry/poetry/issues?q=is%3Aissue+...

Not a week goes by without a new issue popping up. A dependency manager is a critical piece of infrastructure, it should not be the main developer experience bottleneck when building an application. A good package manager is out of sight, out of mind. You don't hear people complaining so much about Cargo every day.

I don't really feel like defending poetry, I don't even use it. But in this particular case, I think the wheel format and the way people try to host it on their servers and the entitled researchers who act like 80 year olds and "just want things done" instead of taking a little bit of time to learn to work with their tools are to blame. None of this exists with the cargo infra.