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 trac…
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.
Using uv with PyTorch
41–50 of 56 posts
Re: Using uv with PyTorch
#42Earlier quoted context omitted.
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.
Does pip-compile do the same? Or what's the difference?
Re: Using uv with PyTorch
#43In 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 trac…
Re: Using uv with PyTorch
#44Conda (and Mamba) allows to avoid duplicating packages on the disk between environments (not just the downloaded archives, but the resulting expanded files too).
How does uv compare in this regard?
Re: Using uv with PyTorch
#45I recently watched a talk by the author of uv that was surprisingly fascinating [1]. He goes into a few of the more notable hacks that they had to come up with to make it as fast as it is. The most interesting thing for me was that package resolution in python given constraints defined (eg. in requirements.txt) maps to a boolean satisfiability problem which is NP-complete. So uv uses a custom SAT solver to do this. I…
I haven’t used Conda since 2021 but recall it had a SAT solver that was very slow especially on degenerate cases. How does uv’s sat solver compare?
Re: Using uv with PyTorch
#46Re: Using uv with PyTorch
#47In 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 trac…
PS: one thing I like about my current workflow is no extra tools needed, base python install is all that‘s required.
Re: Using uv with PyTorch
#48Earlier quoted context omitted.
uv python install 3.xx
That is not global. From the uv getting started docs: "When Python is installed by uv, it will not be available globally (i.e. via the python command). Support for this feature is planned for a future release. In the meantime, use uv run or create and activate a virtual environment to use python directly." So yes, one needs mise/asdf/pyenv or similar for global installs for now.
Re: Using uv with PyTorch
#49I recently watched a talk by the author of uv that was surprisingly fascinating [1]. He goes into a few of the more notable hacks that they had to come up with to make it as fast as it is. The most interesting thing for me was that package resolution in python given constraints defined (eg. in requirements.txt) maps to a boolean satisfiability problem which is NP-complete. So uv uses a custom SAT solver to do this. I…
I haven’t used Conda since 2021 but recall it had a SAT solver that was very slow especially on degenerate cases. How does uv’s sat solver compare?
https://www.anaconda.com/blog/a-faster-conda-for-a-growing-c...
Re: Using uv with PyTorch
#50Earlier quoted context omitted.
I work on our error messages, feel free to open an issue and we'll do our best to make it clearer
Hey there, I experienced a hairy error message recently too while trying to install aider-chat from pypi with Python 3.13 and Pixi (but I was told the error was coming from UV). "Solution": `pixi add python=3.12`, then `pixi add --pypi aider-chat` succeeds without issues. A message like "aider-chat seems to be incompatible with python=3.13, try downgrading to python-3.12" would be great, assuming this is really the c…