You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a heads up as this is something that has been annoying me as of late: --extra-index-url is a global option (doesn't matter where in the requirements.txt file is is specified) and has no predefined priority over the index URL (either standard index URL or an alternative one as specified by -i or --index-url).
Therefore, as per the specs, it is entirely possible that a torch from PyPI will be selected instead of the GPU version... or that a numpy from Pytorch (if it existed) would be selected instead of the PyPI one. As far as I have tested this in the past, this situation does not arise.
There is pypa/pip#8606 about setting channel priorities through pip, and uv uses a different logic to disambiguate. As far as workarounds go, what I am currently doing in other projects is to create a separate requirements-torch.txt with a single --index-url (overriding PyPI) and only adding torch-related packaged to that file. Something to consider!
The text was updated successfully, but these errors were encountered:
I copy-paste the comment of @cako from #590 here:
Just a heads up as this is something that has been annoying me as of late: --extra-index-url is a global option (doesn't matter where in the requirements.txt file is is specified) and has no predefined priority over the index URL (either standard index URL or an alternative one as specified by -i or --index-url).
Therefore, as per the specs, it is entirely possible that a torch from PyPI will be selected instead of the GPU version... or that a numpy from Pytorch (if it existed) would be selected instead of the PyPI one. As far as I have tested this in the past, this situation does not arise.
There is pypa/pip#8606 about setting channel priorities through pip, and uv uses a different logic to disambiguate. As far as workarounds go, what I am currently doing in other projects is to create a separate requirements-torch.txt with a single --index-url (overriding PyPI) and only adding torch-related packaged to that file. Something to consider!
The text was updated successfully, but these errors were encountered: