Skip to content

CI Install pandas when testing the free threaded wheels #29572

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

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented Jul 26, 2024

This is a follow-up of #29247, in particular this comment:

    # There is no pandas free-threaded wheel at the time of writing, so we only
    # install pandas in other builds
    # TODO: adapt when there is a pandas free-threaded wheel

Free-threaded wheels for pandas has recently been made available, according to Quansight-Labs/free-threaded-compatibility#23 (comment).

Copy link

github-actions bot commented Jul 26, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: e1c5060. Link to the linter CI: here

@lesteve lesteve changed the title CI Test free threaded wheels test with pandas CI Test free threaded wheels with pandas Jul 26, 2024
@lesteve lesteve changed the title CI Test free threaded wheels with pandas CI Install pandas when testing the free threaded wheels Jul 26, 2024
Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

From the CI run I see:

 Collecting pandas
    Downloading https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/pandas/3.0.0.dev0%2B1252.gd6c9941b73/pandas-3.0.0.dev0%2B1252.gd6c9941b73-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.6/11.6 MB 50.7 MB/s eta 0:00:00

which means it is picking up cp313t correctly.

LGTM

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM as well although I think adding pandas to CIBW_TEST_REQUIRES was not really needed by it seems harmless.

CIBW_BEFORE_TEST: bash {project}/build_tools/wheels/cibw_before_test.sh
CIBW_TEST_REQUIRES: pytest pandas
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure why we need this, since the dev version of pandas is already installed in cibw_before_test.sh.

I checked the logs and this do not cause pip to override the dev wheel with the stable release wheel:

...
      + pip install pytest pandas
  Collecting pytest
    Downloading pytest-8.3.2-py3-none-any.whl.metadata (7.5 kB)
  Requirement already satisfied: pandas in /tmp/tmp.ZWPQ7oIjQL/venv/lib/python3.13/site-packages (3.0.0.dev0+1252.gd6c9941b73)
...

Copy link
Member Author

@lesteve lesteve Jul 29, 2024

Choose a reason for hiding this comment

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

CIBW_TEST_REQUIRES is used by all the other builds though (i.e. not free-threaded ones). In other words build_tools/wheels/cibw_before_test.sh only does something (install dev pandas) for the free-threaded build for the non free-threaded builds this is a noop.

I guess doing it this way makes it easier to update when eventually when numpy, scipy and pandas have a release with a free-threaded wheel: remove CIBW_BEFORE_TEST and build_tools/wheels/cibw_before_test.sh.

@ogrisel ogrisel merged commit 580ae40 into scikit-learn:main Jul 29, 2024
50 checks passed
@lesteve lesteve deleted the free-threaded-wheels-test-with-pandas branch July 29, 2024 08:34
MarcBresson pushed a commit to MarcBresson/scikit-learn that referenced this pull request Sep 2, 2024
@lesteve lesteve added the free-threading PRs and issues related to support for free-threaded CPython (a.k.a. nogil or no-GIL, PEP 703) label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build / CI free-threading PRs and issues related to support for free-threaded CPython (a.k.a. nogil or no-GIL, PEP 703)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants