←back to thread

Using uv with PyTorch

(docs.astral.sh)
167 points charliermarsh | 2 comments | | HN request time: 0s | source
Show context
alex_suzuki ◴[] No.42192428[source]
In a nutshell, what do I gain from switching to uv from my current workflow, which is: 1) create a venv (`python3.xx -m venv venv`) 2) install packages from a requirements.txt into that venv?

One limitation I know of are the inability to detect stale packages.

Apart from „blazing fast“, which I‘m not convinced it really matters to me as I rarely touch the dependencies, what are the main reasons why uv is gaining traction?

replies(4): >>42192436 #>>42192507 #>>42192711 #>>42198294 #
reubenmorais ◴[] No.42192507[source]
You get correct version resolution (checking compatibility across the entire tree of deps-of-deps, including against different Python versions) and a lock file which represents a global state of the entire tree and gives you reproducibility of a working setup.
replies(1): >>42192563 #
1. gugagore ◴[] No.42192563[source]
Does pip-compile do the same? Or what's the difference?
replies(1): >>42192578 #
2. reubenmorais ◴[] No.42192578[source]
pip-compile, poetry, Pipenv, et al all try do roughly the same, with various caveats and design differences (e.g. Pipenv is not meant to be used in libraries, only applications). uv is the latest kid in the block.