- Notifications
You must be signed in to change notification settings - Fork2.6k
Add prototype implementation of wheel variant specification#12203
Add prototype implementation of wheel variant specification#12203charliermarsh wants to merge 2 commits intomainfrom
Conversation
6ca5626 tof598b60Comparewarsawnv commentedMar 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The But then it seems to succeed. |
charliermarsh commentedMar 17, 2025
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. |
warsawnv commentedMar 17, 2025
And the |
warsawnv commentedMar 17, 2025
I had a feeling about that! |
charliermarsh commentedMar 17, 2025
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. |
warsawnv commentedMar 17, 2025
|
seemethere commentedMar 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
[[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. |
charliermarsh commentedMar 17, 2025
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 to189dd02Comparecharliermarsh commentedMar 17, 2025
(Applied your changes, thanks@warsawnv.) |
bd7d6d2 to9146f46Compare18dfd1e to5ac01b8CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
5ae7861 tof168655Compare531619a to3f33934Compare0009f18 tobaea3acCompareb389852 tod53cca9Compare5131d07 to96182b3Compared3df356 to2918fc7Compareb2b513f tode2d1edComparedc6757b tocc81ee9Comparecc81ee9 to81f0eccCompare
Uh oh!
There was an error while loading.Please reload this page.
(Branch taken over by@konstin)
This branch contains the prototype implementation of wheel variants proposal. It support
uv pip installanduv syncfor basic test cases and torch. Included are:It does not implement
abi_dependencyyet, nor does it consider whether features are multi-value or single value.Naturally, it is not ready for any serious usage yet. Expect that things break, please report problems.
release Installing the latest release, potentially a bit behind this branch:
Unix:
Windows:
latest 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: