-
Notifications
You must be signed in to change notification settings - Fork 765
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
--universal
collapses version markers for same version
#4899
Comments
Thanks, we might be ignoring local tags somewhere that we shouldn't be. |
@charliermarsh hey, can I work on this one? |
@caiquejjx -- Feel free to take a look, I don't have a sense for how hard it is. |
@charliermarsh I took a look and was able to find the root cause of the issue and it's in this line
Since the first version has a local tag it is overriding the one without it. I don't have an good idea of solution, the one I can think is to store the requirements markers on the |
Ah yeah. We need to implement handling for locals that’s similar to how we treat URLs. @konstin has context on that. (This is a known issue, but I didn’t realize it would manifest itself this way.) |
Is this... actually wrong? It looks right to me. |
it is valid but it was specified that for |
Why not, though? |
Huh this is odd, the version specifier docs say this
Which from how I've read it implies that if you ask for I guess the way around that would be to point to a specific download url? |
> uv pip install 'torch==2.3.1+cpu' --find-links https://download.pytorch.org/whl/torch_stable.html
× No solution found when resolving dependencies:
╰─▶ Because torch==2.3.1+cpu has no wheels are available with a matching Python ABI and you require torch==2.3.1+cpu, we can conclude that the requirements are unsatisfiable. I'm not sure if this means that the above rules are not being respected somewhere or if as @lbowenwest suggests |
But |
But given that the initial requirements provided were:
surely the end resolved set of dependencies could reasonably be
|
It's reasonable but I don't know that it's more correct than what we output, for two reasons... (1) On |
Just to be totally clear, I don't think what you're suggesting is unreasonable. I'm just trying to point out that there are tradeoffs here and both solutions will be problematic in different ways, with the root cause being that Torch has scattered platform support (and no source distributions). |
Yeah, I'm 100% onboard with the fact that the way Unfortunately, it is also causing me issues so I'm a little biased 😉 |
Do we have a solid repro for this? I can't seem to reproduce it:
Maybe this got fixed? So I checked an older version of
Which I think matches the errant behavior shown in the OP of this issue. Then
And |
Trying to use
uv
to install specific versions oftorch
on a specific platforms with a universal lock file, on macos silicon we want to install2.3.1
but on x64 systems we want to install2.3.1+cpu
to avoid including the gpu dependencies.A minimal reproducible example
requirements.txt
isWhen doing
uv pip compile requirements.txt
on the appropriate system it finds the correct version, however when runninguv pip compile requirements.txt --universal
it produces the following linefull verbose output
Using a different version such as
produces the following correct output
The text was updated successfully, but these errors were encountered: