Repository navigation
Run the SFT assistant-mask suite on PRs (version-compat bundle guard red on main) - #18827
Conversation
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59b370eb35
ℹ️ 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".
| for step in job.get("steps") or []: | ||
| body = str(step.get("run", "")) | ||
| if not re.search(r"-m pytest\b[^\n]*\stests/(?:\s|\\|$)", body): | ||
| continue | ||
| ignored = re.findall(r"--ignore(?:-glob)?=['\"]?([^\s'\"\\]+)", body) |
There was a problem hiding this comment.
Verify the sweep runs in this repository before exempting the suite
The inspected consolidated-zoo sweep runs with working-directory: ${{ runner.temp }}/unsloth-zoo in .github/workflows/consolidated-tests-ci.yml:2137, so its relative tests/ argument collects the separate unsloth-zoo checkout, not this repository's tests/version_compat/test_sft_assistant_mask_fallback_trainer.py. This helper nevertheless reports coverage because it only checks the command text and ignore flags. Exempting the suite therefore silences the existing coverage failure without actually running the SFT regression test on PRs. Wire the suite into an install-bearing PR job in this repository and validate the sweep's working directory before treating it as coverage.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Right, that sweep runs with working-directory: ${{ runner.temp }}/unsloth-zoo, so it collects the zoo's tests and the exemption was hollow. Fixed in e5f8fa6: the suite now runs by path in a step of the consolidated (Core) job, which has the real torch / TRL / unsloth stack, and the guard only counts a step with no working-directory. A mutation test covers the directory sweep, the moved working directory and a schedule-only gate.
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. 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". |
Summary
workflow-trigger lintis red onmainand on every open PR since #18809:#18809 added
tests/version_compat/test_sft_assistant_mask_fallback_trainer.py, which drives the realUnslothSFTTrainerthrough TRL's assistant-only-loss path and so needs torch, TRL and unsloth. The guard is right: nothing runs it on a PR. Naming it inversion-compat-ci.yml'spinned-symbol-matrixbundle would not help, because that job installs only pytest and the suite would just skip. Theconsolidated-zoofull sweep does not reach it either: that step runs from the zoo checkout, so itstests/is the zoo's.Fix
consolidated(Core) job, which installs the real stack across all three transformers / TRL combos, running the suite by path from this checkout.RUN_BY_COREin the bundle guard lists suites covered that way, andtest_suites_left_to_the_core_job_run_therechecks the claim instead of trusting it:consolidated-tests-ci.ymlmust trigger onpull_request, theconsolidatedjob must not be gated to schedule or dispatch, and one of its steps must name the file without aworking-directory(a step run from another checkout collects that repo's tests).test_the_core_job_check_is_not_vacuousmutates the parsed workflow three ways (path replaced by a directory sweep, step moved under the zoo checkout, job gated onschedule) and asserts each is reported.Testing
tests/version_compat/test_sft_assistant_mask_fallback_trainer.pywith real torch, TRL 1.15 and transformers 5.17 on CPU: 1 passed.tests/studio/test_version_compat_bundle.py: 9 passed; the unmodified guard frommainstill fails on the same file.workflow-trigger-lint.ymlruns, plus the suites that readconsolidated-tests-ci.yml: no new failures (one pre-existing local-only failure from this host's cache environment variables, green in CI).