Skip to content

chore: Only use pytorch index-url for pytorch package #22355

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

Merged
merged 2 commits into from
Apr 26, 2025

Conversation

mcrumiller
Copy link
Contributor

@mcrumiller mcrumiller commented Apr 21, 2025

Note: I am not 100% sure I have done this right so someone more familiar with project setup please review!


While trying to fix (whoops, triggered issue close keyword) work on #22348 (with no success so far), I discovered that by using --extra-index-url in requirements-ci.txt

--extra-index-url https://download.pytorch.org/whl/cpu

we were inadvertently using the pytorch repo for many package installations, including numpy, since when you use --extra-index-url it becomes prioritized (see docs) over PyPi. This was causing packages to be installed from pytorch instead of PyPi, and subsequently was not installing the latest version. For example, pytorch's latest available numpy is 2.1.2, whereas PyPi has 2.2.5.

I believe this helps ensure we're testing on the latest version of more packages. @MarcoGorelli I think I saw your comment on an issue somewhere so I think you may have helped set up the extra-index-url bit, is that true?

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Apr 21, 2025
@@ -93,6 +93,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.12'
check-latest: true
Copy link
Contributor Author

@mcrumiller mcrumiller Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also ensures we're testing on the latest python 3.12, which is now 3.12.10 (our CI had 3.12.9 cached and was continuing to use that).

@mcrumiller mcrumiller marked this pull request as ready for review April 21, 2025 21:11
@mcrumiller mcrumiller changed the title chore: Only use pytorch repo for pytorch package chore: Only use pytorch index-url for pytorch package Apr 21, 2025
@ritchie46 ritchie46 merged commit 29ae86e into pola-rs:main Apr 26, 2025
13 of 14 checks passed
@mcrumiller mcrumiller deleted the check-test branch April 26, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants