-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add prototype implementation of wheel variant specification #12203
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
base: main
Are you sure you want to change the base?
Conversation
6ca5626
to
f598b60
Compare
The
But then it seems to succeed. |
Ah sorry. I’ll update the instructions. You can either remove that section from the pyproject.toml, then run the build script, then re-add it. Or run cargo build, then point the build script to ./target/debug/uv instead of your global uv. |
And the
|
I had a feeling about that! |
You can run uv venv prior to the cargo run command to create a virtual environment in the current working directory. cargo run will then install into that virtual environment by default. |
|
[[tool.uv.variant]]
backend = "provider_fictional_hw.plugin:build"
requires = ["provider_fictional_hw"] For this configuration I'm curious if this would be end-user facing or would this be package maintainer facing? From my POV I feel like this would be best served at the package maintainer side where a potential PyTorch packaging config might look like: [[tool.uv.variant]]
backend = "torch.build.variants:detect_variants"
requires = ["cuda_variants", "rocm_variants", "xpu_variants", "your_fav_hardware_variants"] fwiw I don't know if requiring people to install variant plugins themselves is necessarily going to be a way to adopt this heavily since this should be something that reduces the friction towards someone installing the correct package for their machine instead of them having to remember which variant plugins they're installing vs. not. |
I was thinking it would be declared by the package maintainer, but possibly overridable by the end user (so, like, if they don't care about |
f598b60
to
189dd02
Compare
(Applied your changes, thanks @warsawnv.) |
bd7d6d2
to
9146f46
Compare
18dfd1e
to
5ac01b8
Compare
5ae7861
to
f168655
Compare
531619a
to
3f33934
Compare
0009f18
to
baea3ac
Compare
b389852
to
d53cca9
Compare
5131d07
to
96182b3
Compare
## Summary Looks like: ``` Package Version Variant ------- ------- ---------- numpy 2.3.3 accelerate scipy 1.16.2 accelerate ``` Closes #16086.
56ac4e1
to
763ddc9
Compare
(Branch taken over by @konstin)
This branch contains the prototype implementation of wheel variants proposal. It support
uv pip install
anduv sync
for a basic test case and torch. Expect that things break, please report problems. It support static and dynamic providers as well as markers. Naturally, it is not ready for any serious usage yet.The best way to test is to clone the repo, checkout the branch (charlie/wheel-variant) and run:
If you don’t have Rust installed, there's a bootstrapping process from current uv, though it's slow:
To use a static variant declaration, i.e. not query any providers, you pass a JSON file by settings its path in
UV_VARIANT_LOCK
. It assumes that you don't want to run any additional providers with it, i.e. no third party code execution, unless you setUV_VARIANT_LOCK_INCOMPLETE=1
. The file format has to follow the schema below: