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

feat: allow merging multiple simpleapi indexes #2642

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aignas
Copy link
Collaborator

@aignas aignas commented Mar 1, 2025

Before this change users would have no way to download pytorch from
multiple indexes (e.g. cpu version on some platforms and gpu on
another) and use it inside a single hub repository.

This brings the users necessary toggles to tell rules_python to search
in multiple indexes for the torch wheels. Note, that the
index_strategy field is going to be used only if one is setting
multiple indexes via the extra_index_urls and not via the
index_url_overrides.

Whilst at it I have improved the simpleapi_download tests to also test
the warning messages that we may print to the user.

Fixes #2622

Before this change users would have no way to download pytorch from
multiple indexes (e.g. `cpu` version on some platforms and `gpu` on
another) and use it inside a single hub repository.

This brings the users necessary toggles to tell `rules_python` to search
in multiple indexes for the `torch` wheels. Note, that the
`index_strategy` field is going to be used only if one is setting
multiple indexes via the `extra_index_urls` and not via the
`index_url_overrides`.

Whilst at it I have improved the `simpleapi_download` tests to also test
the warning messages that we may print to the user.

Fixes bazel-contrib#2622
@keith
Copy link
Member

keith commented Mar 3, 2025

FYI this does not seem to fix #2634, because in that example torch is coming from the same index URL either way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip.parse parsing all requirements files fails on platform specific wheel downloads
2 participants