Repository navigation
Fix the three CI failures blocking every open PR - #7722
Merged
Merged
Conversation
TRL 1.7.0 removed completion_only_loss from trl.trainer.sft_trainer.DataCollatorForLanguageModeling when label construction moved from collation into dataset preparation (huggingface/trl#6037). tests/utils/test_packing.py passed that kwarg on every construction attempt, so on TRL 1.x every attempt raised TypeError, _DummyTrainer.data_collator was never assigned, and test_enable_sample_packing failed with AttributeError on the HF=latest + TRL=latest matrix leg. Filter the collator kwargs against the installed dataclass signature so the dummy tracks whatever fields TRL currently exposes, and add a regression test pinning the production contract that enable_sample_packing only requires torch_call on the collator. (cherry picked from commit 5d8513b)
…el carries #7549 The "virgin win container / overlay=false" row installs unsloth from PyPI on purpose, so its studio/setup.ps1 comes out of the released wheel. A Server Core container has no Microsoft Store and so no winget, and the released setup.ps1 hard-stopped on a winget-only git gate and reached for winget again for the VC++ runtime, so that row could not install end to end. #7549 relaxed both gates but merged on 2026-07-29, after the then newest wheel 2026.7.5 (2026-07-23), so the row was held under continue-on-error and a step that asserted it failed only on that known signature. unsloth 2026.7.6 shipped later the same day and is the first wheel to carry the relaxed gates: unpacking it shows the old "Git is required but could not be installed automatically" wording gone and both "so git is not needed" and "downloading the runtime directly" present. The row now installs end to end and the pin's own tripwire fired to say so. Drop continue-on-error from the Install step and delete the release-lag assertion, so the released-wheel row gates like the overlay row. The Install step is already passing on this row in recent runs, so nothing else is being tolerated by the escape hatch being removed. (cherry picked from commit cf0b25e)
Removing the released row's tripwire made a green released row reachable for the first time, and the only log-based verdict check sat behind `if: matrix.overlay`. Every later step is `if: always()` and exits 0, so that row was gated on `docker exec`'s exit code alone -- which the file already notes can be 0 for an exec that lost its container. Hoisted the marker check out of the overlay step so both rows read the harness's own verdict; the overlay-specific assertions stay gated. (cherry picked from commit 7613460)
…geometry The geometry check baselines the panel with a single bounding_box() taken as soon as the caller observes an /api/system request go out. The response has not been applied yet at that point, so the panel is still painting use-system.ts's zero-filled DEFAULT_SYSTEM, which reports no GPU. On a host that does report one the VRAM row then lands and adds a row permanently, so the panel never returns to the sampled baseline and "content shrink" waits out its whole 5s deadline before failing. That is why this looked flaky but is not: macos-14 reports a single MLX device and failed on every PR, while ubuntu-latest and windows-latest have no GPU row to add and passed. Three jobs share the name "Chat UI Tests", so the one consistent platform failure read as one of three parallel runs failing at random. Wait for the payload to be rendered and for the panel to have finished resizing to it before sampling the baseline. The gate requires a non-zero RAM total, the scroll region to exactly fit the content it was reconciled against, and that geometry to hold for two consecutive animation frames, which is how Playwright defines a stable element and is what wait_for_function's default polling="raf" provides. (cherry picked from commit 7d5cc8c)
Member
Author
|
@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". |
This was referenced Aug 6, 2026
CI: Core (HF=latest + TRL=latest) fails on main: _DummyTrainer leaves data_collator unassigned
#7708
Closed
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.
Three unrelated CI failures are red on every open PR in the repo, so nothing can go green on its own merits. This combines the three fixes into one change: each was reviewed separately, and the files here are byte-identical to those reviewed heads. Supersedes #7713, #7712 and #7714.
None of the three is a flake, and none is caused by the PRs they were failing on.
1.
Core (HF=latest + TRL=latest)—tests/utils/test_packing.py_DummyTrainerbuilt TRL'sDataCollatorForLanguageModelingfrom a hardcoded kwarg set, then walked a ladder oftry/except TypeErrorfallbacks for the optional flags.completion_only_losswas in the always-passed group, so when TRL removed that field the first constructor call raisedTypeErrorand so did every rung of the ladder. The dummy trainer ended up with nodata_collatorat all, and the test failed with anAttributeErrornaming neither TRL nor the removed field.Upstream removal: huggingface/trl commit
f9aeb59(huggingface/trl#6037), which moved completion-only label masking into dataset preparation. First released in TRL v1.7.0.The collator is now built from the installed TRL's live signature, which subsumes the fallback ladder:
Adds
test_enable_sample_packing_only_requires_torch_call, pinning the contract the test was implicitly relying on:enable_sample_packingmay require nothing of a collator beyondtorch_call.Test-only. Production was never affected:
unsloth/utils/packing.pyreads the collator viagetattr(trainer, "data_collator", None)and guards every optional field withhasattr, andunsloth/models/rl.pyreferences the transformers class, not TRL's.Verified on TRL 0.22.2, 0.25.1, 0.29.1, 1.6.0, 1.7.1 and 1.9.2, so both the pre-1.7 and post-1.7 field sets are covered.
2.
virgin win container / overlay=false—clean-machine-install-ci.ymlThe released-wheel row carried
continue-on-errorplus a tripwire step asserting the install had failed, both there for a release lag that has since passed. The released wheel now installs end to end, so a step demanding failure fails.Removing the tripwire alone would have left a hole: the only check for the
VIRGIN WINDOWS CONTAINER INSTALL PASSEDmarker sat behindif: matrix.overlay, and every later step isif: always()and exits 0, so the released row would have been gated ondocker exec's exit code alone — the case the file's own comment anticipates, since an exec that loses its container also exits 0. The marker check is hoisted into its own ungated step; the overlay-specific assertions stay gated.3.
Chat UI Tests—tests/studio/playwright_chat_ui.pyThis one reads as a flake but is deterministic. Three separate workflows publish the check name
Chat UI Tests, so one consistently broken platform looks like "one of three parallel runs failed at random". On #7686 the three are three different runners, and it is always the mac:macos-14ubuntu-latestwindows-latestEvery mac failure emits the identical box,
{'x': 1008, 'y': 712, 'width': 256, 'height': 172}.In
exercise_floating_monitor_geometry, the caller gates on the/api/systemrequest rather than its response, becausectx.on("request", ...)fires when the request is issued.initial_boxis then sampled with no further gate. Until the response is applied the panel paintsuse-system.ts'sDEFAULT_SYSTEM, whosegpuis{available: false, devices: []}. On macOSdetect_hardware()returnsDeviceType.MLXandhardware.py:2705reports one available device, sohasGpuflips andfloating-monitor.tsx:469renders a VRAM row, changing the panel's natural height permanently.The later predicate then cannot be satisfied: the bottom-anchor half passes (712 + 172 = 884 = 900 - 16), only the height comparison against the stale baseline fails. The growth check is satisfied by the VRAM row alone, which is why growth completes in 0.4s and the shrink burns its whole deadline. Measured against the real component: RAM alone renders 113.5px, RAM plus one VRAM row renders exactly 172.0px at y=712.
The fix waits for the real signal before baselining, in one
wait_for_function: a non-zero RAM total, the scroll region exactly fitting the content it was reconciled against, and that geometry holding for two consecutive animation frames. The frame-stability condition is load-bearing, because an intermediate state exists where both rows are present but thespace-y-3gap is not yet applied, and that state is self-consistent. Two frames is how Playwright defines a stable element, andwait_for_functiondefaults topolling="raf". No sleeps added, no timeout raised.Before and after, running the real function against the live component with the response held back by a randomised delay:
Every "before" failure reproduced the byte-identical CI string. The no-GPU control explains why ubuntu and windows pass and confirms the fix does not regress them.
Confirmed on the real runner: all three
Chat UI Testsjobs pass on #7714, includingmacos-14.Scope
Two test files and one workflow. No production code path is touched.
Not established locally: the chat UI suite was not run end to end (the harness renders the real
FloatingMonitorthrough the project's own vite server and executes the real test function, but it is not the whole suite), and it was not run on macOS, so the MLX step rests on the backend source plus the platform correlation of the failing jobs. CI here covers both.