-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: replace pip
with uv
by Astral.sh
#952
Conversation
It's of course blazingly fast, but it doesn't support all the functionality of the pip. (lit-gpt-uv) ➜ lit-gpt git:(autogptq_integration) uv pip install -r requirements-all.txt INSERT
error: Unsupported requirement in requirements-all.txt at position 658
Caused by: URL requirement must be preceded by a package name. Add the name of the package before the URL (e.g., `package_name @ https://...`).
git+https://github.com/EleutherAI/lm-evaluation-harness.git@115206dc89dad67b8beaa90051fb52db77f0a529
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I see that it's developing in a quite intensive manner, so I think we can revisit it in a month or so, but right now it's not a drop-in replacement for pip. |
It doesn't know (lit-gpt-uv) ➜ lit-gpt git:(autogptq_integration) uv pip list INSERT
error: unrecognized subcommand 'list'
tip: a similar subcommand exists: 'install'
Usage: uv pip [OPTIONS] <COMMAND>
For more information, try '--help'. |
On my local machine, with all the packages being cached, But it throws some unexpected errors. |
Not yet ready for integration, but close. The biggest issues:
I'll try it one more time in a week. |
Honestly I would be fine merging it now that it's working at least |
pip
with uv
by Astral.sh
Co-authored-by: Andrei-Aksionov <aksionau.andrei@gmail.com>
By the way, we now support |
Thanks for the heads up Charlie. I just gave it a try in #1187 but non-editable requires But adding this makes dependencies of our dependencies also install prereleases. This in turn installs the current numpy prerelease ( A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0b1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled against NumPy 2.0.
If you are a user of the module, the easiest solution will be to
either downgrade NumPy or update the failing module (if available).
Traceback (most recent call last): File "<string>", line 1, in <module>
File "/home/runner/work/litgpt/litgpt/litgpt/__init__.py", line 6, in <module>
from litgpt.model import GPT # needs to be imported before config
File "/home/runner/work/litgpt/litgpt/litgpt/model.py", line 12, in <module>
import torch
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/torch/__init__.py", line 1477, in <module>
from .functional import * # noqa: F403
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/torch/functional.py", line 9, in <module>
import torch.nn.functional as F
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/torch/nn/__init__.py", line 1, in <module>
from .modules import * # noqa: F403
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/torch/nn/modules/__init__.py", line 35, in <module>
from .transformer import TransformerEncoder, TransformerDecoder, \
File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/torch/nn/modules/transformer.py", line 20, in <module>
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: module compiled against ABI version 0x1000009 but this version of numpy is 0x2000000 (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.) Is there a way to set |
Ah yeah, we do allow prereleases for direct dependencies, but we treat |
author: @Andrei-Aksionov
Hello there 👋
This PR replace
pip
with blazingly fastuv
by Astral.sh.Couple of notes:
uv
is so fast, that the process of retrieving and unpacking stored cache slows down things a bit.UV_HTTP_TIMEOUT
is increased to 500 seconds, since sometimesuv
might hang during package download. But when it works, it downloads them really fast.uv pip install .
, so the workaround with installing packages in an editable mode (which is supported) is used here.