Bump trl to 1.9.0#937
Bump trl to 1.9.0#937qgallouedec wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d31f06a55e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "packaging>=24.1", | ||
| "transformers>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,!=4.57.4,!=4.57.5,!=5.0.0,!=5.1.0,<=5.5.0", | ||
| "datasets>=3.4.1,!=4.0.*,!=4.1.0,<4.4.0", | ||
| "datasets>=3.4.1,!=4.0.*,!=4.1.0,<=5.0.0", |
There was a problem hiding this comment.
Exclude the known-broken datasets releases
When an environment pins or otherwise resolves datasets to 4.4.x or 4.5.0, this widened requirement now accepts versions that the repository explicitly treats as unusable: tests/test_upstream_import_fixes_drift.py:82-94 rejects the 4.4.0–4.5.0 range because it triggers _thread.RLock_recursion_count errors in the Arrow loader. The previous <4.4.0 ceiling prevented that installation, so the widened range should retain exclusions for those releases while allowing the >=4.7.0 versions required by TRL 1.9.0; the matching core constraint needs the same correction.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Updates dependency constraints so unsloth_zoo no longer forces trl<=0.24.0, enabling unsloth to resolve and use newer trl releases.
Changes:
- Raised
trlupper bound from0.24.0to1.9.0(including the non-darwin-arm64 marker site). - Raised
datasetsupper bound from<4.4.0to<=5.0.0(in both dependency lists).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "tyro ; (sys_platform != 'darwin' or platform_machine != 'arm64')", | ||
| "accelerate>=0.34.1 ; (sys_platform != 'darwin' or platform_machine != 'arm64')", | ||
| "trl>=0.18.2,!=0.19.0,<=0.24.0 ; (sys_platform != 'darwin' or platform_machine != 'arm64')", | ||
| "trl>=0.18.2,!=0.19.0,<=1.9.0 ; (sys_platform != 'darwin' or platform_machine != 'arm64')", |
| "packaging>=24.1", | ||
| "transformers>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,!=4.57.4,!=4.57.5,!=5.0.0,!=5.1.0,<=5.5.0", | ||
| "datasets>=3.4.1,!=4.0.*,!=4.1.0,<4.4.0", | ||
| "datasets>=3.4.1,!=4.0.*,!=4.1.0,<=5.0.0", |
| "tyro", | ||
| "transformers>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,!=4.57.4,!=4.57.5,!=5.0.0,!=5.1.0,<=5.5.0", | ||
| "datasets>=3.4.1,!=4.0.*,!=4.1.0,<4.4.0", | ||
| "datasets>=3.4.1,!=4.0.*,!=4.1.0,<=5.0.0", |
| "numpy", | ||
| "accelerate>=0.34.1", | ||
| "trl>=0.18.2,!=0.19.0,<=0.24.0", | ||
| "trl>=0.18.2,!=0.19.0,<=1.9.0", |
| "tyro ; (sys_platform != 'darwin' or platform_machine != 'arm64')", | ||
| "accelerate>=0.34.1 ; (sys_platform != 'darwin' or platform_machine != 'arm64')", | ||
| "trl>=0.18.2,!=0.19.0,<=0.24.0 ; (sys_platform != 'darwin' or platform_machine != 'arm64')", | ||
| "trl>=0.18.2,!=0.19.0,<=1.9.0 ; (sys_platform != 'darwin' or platform_machine != 'arm64')", |
| "numpy", | ||
| "accelerate>=0.34.1", | ||
| "trl>=0.18.2,!=0.19.0,<=0.24.0", | ||
| "trl>=0.18.2,!=0.19.0,<=1.9.0", |
Companion to the
unslothPR bumpingtrl(unslothai/unsloth#7376).unsloth_zoois a hard dependency ofunslothand also capstrl<=0.24.0, so pip resolves the intersection and the ceiling stays at0.24.0unless this repo is bumped too.0.24.0was released 2025-10-16 (~9 months ago, ~24 releases behind current1.9.0).Changes (
pyproject.toml)trl>=0.18.2,!=0.19.0,<=0.24.0→<=1.9.0(both sites, incl. the non-darwin-arm64 marker)datasets ... <4.4.0→<=5.0.0: required: trl 1.9.0 depends ondatasets>=4.7.0, so the old cap made the bump unresolvable.An explicit upper bound is kept deliberately, so a future trl release can't silently break the trl-coupled paths; where to cap is the maintainers' call.
Why it's safe
unsloth_zoo's trl coupling is light and 1.9.0-clean:from trl import is_conversational,import trl.trainer.dpo_trainer,dir(trl.trainer)/inspect.getfile(trl.trainer): all present in 1.9.0.from trl.trainer.utils import ConstantLengthDatasetis alreadytry/except-guarded (falls back toNone, with a comment noting trl removed it): no break.Runtime-validated at this commit (
unsloth_zoo2026.7.6) against an installedtrl==1.9.0, driven through theunslothversion-compat suite: