Skip to content
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

Prefer local variants in preference selection #11546

Merged
merged 1 commit into from
Feb 16, 2025
Merged

Conversation

charliermarsh
Copy link
Member

Summary

This PR fixes a subtle issue arising from our propagation of preferences. When we resolve a fork, we take the solution from that fork and mark all the chosen versions as "preferred" as we move on to the next fork.

In this specific case, the resolver ended up solving a macOS-specific fork first, which led us to pick 2.6.0 rather than 2.6.0+cpu. This in itself is correct; but when we moved on to the next fork, we preferred 2.6.0 over 2.6.0+cpu, despite the fact that 2.6.0 only includes macOS wheel, and that branch was focused on Linux.

Now, in preferences, we prefer local variants (if they exist). If the local variant ends up not working, we'll presumedly backtrack to the base version anyway.

Closes #11406.

@charliermarsh charliermarsh added the bug Something isn't working label Feb 16, 2025
@charliermarsh charliermarsh force-pushed the charlie/local-pref branch 2 times, most recently from e01230d to 1e03f0b Compare February 16, 2025 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot install the CPU version of torch 2.6.0
1 participant