Skip to content

Run tests_min_versions on Python 3.11 and pin every dependency at its floor - #7741

Open
albertvillanova wants to merge 3 commits into
mainfrom
pin-direct-deps-min-versions
Open

albertvillanova wants to merge 3 commits into
mainfrom
pin-direct-deps-min-versions

Conversation

@albertvillanova

@albertvillanova albertvillanova commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

This PR moves the tests_min_versions CI job to Python 3.11 and pins huggingface_hub, numpy, pandas, psutil, pyarrow and pyyaml at their pyproject.toml floors, so the job tests every declared floor exactly.

Motivation

The job ran on Python 3.13 (#7648), where numpy 1.26.0, pandas 2.1.1 and pyyaml 6.0.1 have no wheels, so it could not pin the floors declared in #7713. Python 3.11 is the oldest supported Python, and every floor installs on it.

Solution

Moving the job keeps a single minimum-versions job with a single pin list, instead of adding a second, nightly one on 3.11 (#7744). Python 3.13 is still tested on every PR with the latest dependencies; only the combination of minimum versions with 3.13 goes away. Over the last 57 nightly runs of the Python versions workflow, no failure was specific to one Python version.

Changes

  • Run tests_min_versions on Python 3.11
  • Pin huggingface_hub==0.34.0, numpy==1.26.0, pandas==2.1.1, psutil==5.9.4, pyarrow==21.0.0 and pyyaml==6.0.1

Depends on

With every floor pinned on Python 3.11, the job passes except for test_examples_index_matches_folders (2055 passed, 1 failed: https://github.com/huggingface/trl/actions/runs/38909894519/job/117002780666). torch 2.6.0 ships NVRTC 12.4, which can leave an xdist worker's locale as C (#7720), and that test reads a non-ASCII doc without an explicit encoding. The failure depends on which xdist worker the test lands on, so it is not deterministic. #7764 makes it read the file as UTF-8. The failure is not related to the floors.


Note

Low Risk
CI-only workflow changes; no runtime or library code is modified.

Overview
The Tests with minimum versions job now runs on Python 3.11 (was 3.13) so dependency pins can match pyproject.toml floors instead of newer releases chosen only for 3.13 wheel availability.

The install step pins six TRL direct dependencies alongside the existing minimum pins: huggingface_hub==0.34.0, numpy==1.26.0, pandas==2.1.1, psutil==5.9.4, pyarrow==21.0.0, and pyyaml==6.0.1. A comment notes that using the oldest supported Python keeps each pin aligned with the declared minimum versions.

Reviewed by Cursor Bugbot for commit d93f568. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added the 🔧 maintenance CI, tooling, tests, or repo upkeep label Oct 15, 2026
@bot-ci-comment

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova albertvillanova changed the title Pin TRL's direct dependencies in the minimum-versions CI job Pin TRL's direct dependencies in tests_min_versions CI job for Python 3.13 Oct 15, 2026

@qgallouedec qgallouedec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! If we move this job to 3.11 instead (see #7744), the pins can just be the floors, so I'd hold this one until we settle that.

@albertvillanova albertvillanova changed the title Pin TRL's direct dependencies in tests_min_versions CI job for Python 3.13 Run tests_min_versions on Python 3.11 and pin every dependency at its floor Oct 16, 2026
@albertvillanova

Copy link
Copy Markdown
Member Author

Done: the job now runs on Python 3.11, and every pin is exactly its pyproject.toml floor.

@albertvillanova

Copy link
Copy Markdown
Member Author

CI is red: tests/test_examples_index.py::test_examples_index_matches_folders fails in the minimum-versions job with UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2: https://github.com/huggingface/trl/actions/runs/38909894519/job/117002780666

The floors are not the cause: the other 2055 tests pass with every dependency pinned at its floor on Python 3.11. torch 2.6.0 ships NVRTC 12.4, which can leave an xdist worker's locale as C (#7720), and this test reads a non-ASCII doc without an explicit encoding. The failure depends on which xdist worker the test lands on, so it is not deterministic.

This PR depends on:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 maintenance CI, tooling, tests, or repo upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants