Repository navigation
CI: skip an experimental TRL trainer whose own module needs an optional extra - #17687
Merged
Merged
Conversation
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Core (HF=latest + TRL=latest)fails on every PR since TRL 1.18.0 was released today (for example on the staging runs for #17521, #17534 and #16421):TRL 1.18 added
trl/experimental/async_grpo/openenv_harness.py, which definesHarnessAsyncGRPOTrainerand imports the optionalopenenvpackage at module level. The CI job does not installopenenv, so that one submodule cannot be imported. The inline test (inconsolidated-tests-ci.yml) finds everyclass *Trainerintrl.experimental.*by regex, walks the package's submodules to locate each one, and swallows submodule import errors. So the class is reported as "declared in source but not importable", as if TRL's public surface had drifted.TRL is right, and Unsloth does not patch this trainer. The test already skips a whole experimental package whose
__init__needs an optional dependency (IMPORT-SKIP), but it had no equivalent for a single submodule.Reproduced with TRL 1.18.0 and transformers 5.23.0: 1 failed, 4 passed.
Change
In the submodule walk, a
ModuleNotFoundErrorfor a non-trlmodule counts as an optional-extra skip, but only when the submodule that failed is the file declaring the class. It is logged as anIMPORT-SKIPline naming the module and the missing package. Every other case still lands inmissing:trl.*module.Testing
Running the inline test extracted from the workflow:
IMPORT-SKIP trl.experimental.async_grpo.openenv_harness.HarnessAsyncGRPOTrainer: needs the optional openenv.trl/experimental/async_grpo/zz_ghost.pythat raisesRuntimeErrorbefore declaringGhostTrainerstill fails with[('async_grpo', 'GhostTrainer')].test_cache_budget_discipline.py,test_pip_cache_naming.py,test_zoo_suite_parallel_isolation.py,test_trl_cap_sites.py): 295 passed, 3 skipped.