Repository navigation
Fix main's red Backend CI, repo and picker contract tests after #13724, #13749 and #13828 - #13846
Conversation
Codex Review SummaryThis 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 |
|
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". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
…3909) With #13846 merged, main (d303bac) is still red in Backend CI and Repo tests, from three regressions that landed in the last few hours. Each is reproduced locally on main and fixed here. ## 1. `test_text_io_names_its_encoding[drafter.py]` (from #13806) ``` drafter.py:222: subprocess(text = True) without encoding ``` `core/training/drafter.py` runs the drafter capability probe in a child interpreter with `text = True` and no encoding, so the parent decodes the child's output with the locale codec (cp1252 on Windows, ASCII under a C locale). The guard is right and the code is what changes: the call now passes `encoding = "utf-8", errors = "replace"`, and the child gets `PYTHONIOENCODING=utf-8` so it writes what the parent reads. That matches how `core/training/worker.py` runs its own probes. The payload line is `json.dumps` output, so nothing parsed changes. ## 2. `test_backfill_splits_a_quant_suffix_the_way_the_backend_does` (from #13899) ``` AssertionError: MXFP ``` #13899 widened the GGUF known-quant pattern from `MXFP...` to `(?:MX|NV)FP...` so NVFP4 files get their own variant key. That change is right, and it was made consistently in all three places that must agree: `core/inference/llama_cpp.py` (`_GGUF_KNOWN_QUANT_RE`), `hub/utils/gguf.py` (`_GGUF_QUANT_RE`) and the frontend's `model-identity.ts` (`QUANT_TOKEN_SOURCE`). The test was checking that the literal substring `MXFP` appears in `llama_cpp.py`, which it no longer does. The test now checks the property it was standing in for: it reads the pattern string out of both Python modules with `ast` (adjacent literals joined as Python joins them) and the TypeScript constant, asserts all three are identical, and asserts the shared pattern still fully matches `MXFP4`, `NVFP4`, `IQ4_XS`, `TQ1_0`, `Q4_K_M`, `Q8_0`, `BF16`, `F16` and `F32`. That is stricter than before, since a pattern edited on one side only now fails, and it no longer breaks on a correct rewording. ## 3. `test_every_tracked_python_file_is_already_formatted` Formatter drift (pinned ruff 0.6.9 via `scripts/run_ruff_format.py`), output only, no logic change: | file | from | | --- | --- | | `studio/backend/core/inference/llama_cpp.py`, `offload_layout.py`, `tests/test_nemotron35_bolt_super.py`, `tests/test_nemotron35_planner.py` | #13899 | | `studio/backend/tests/test_muse_spark.py` | #13903 | | `tests/test_norm_fast_launch.py`, `unsloth/kernels/layernorm.py` | #13889 | | `tests/test_remote_code_class_and_expert_submodules.py`, `unsloth/models/_utils.py` | #13851 | | `tests/test_triton_fp_fusion.py` | #13846 | ## Verification - `tests/test_formatter_fixed_point.py` (ruff 0.6.9): fails on main, 16 passed here. - `tests/studio/test_model_picker_contracts.py` and `tests/test_runtime_text_encoding.py`: 210 passed. - `studio/backend/tests/test_text_io_encoding.py`, `test_nemotron35_bolt_super.py`, `test_drafter_training.py`: all pass except `test_capability_child_process_runs_for_real`, which fails identically on main without this change on this host (it runs the probe in a real child interpreter) and is not failing in CI. - Sabotage on the rewritten picker guard: dropping `NV` from the pattern in `hub/utils/gguf.py` only, or in `model-identity.ts` only, fails it; restored, it passes. - Sabotage for (1) is main itself: without the encoding, the guard fails as quoted above.
#13724 landed with three CI jobs red, #13749 left a picker contract test behind, and #13828 added a test file the formatter and encoding checks reject, so main fails
(Python 3.13, a-k),(Python 3.13, rest),Repo tests (CPU, rest)andRepo tests (CPU, studio)on every PR. This brings those tests back to green. No runtime behaviour changes beyond naming the peak store's encoding.What was failing on main (
59ab069b5)test_text_io_names_its_encoding[diffusion_measured_peaks.py]andtest_shipping_code_names_an_encoding: the learned-peak store reads withread_text()and writes throughos.fdopen(fd, "w")without an encoding, so the locale decides it (cp1252 on Windows, ASCII under a C locale).test_calibration_records_and_reuses_for_any_family,test_retagged_peak_is_recorded_under_the_mode_that_ran:record_request_peaknow records a keyed peak only whenstream_window_pad_mib(pipe)can size the placement ("an unknown placement enters neither the keyed table nor the store"). The tests' fake pipe has no placement, so nothing was recorded andmeasured_extra_mibreturnedNone.test_oom_inside_the_first_offload_apply_unwinds_its_hooksimportsdiffusers.hooksdirectly, and the Backend CI runners have no diffusers, so it errors withModuleNotFoundErrorthere instead of skipping.test_diffusion_capability_labeled_image_video_gen(tests/studio/test_model_picker_contracts.py) still expects "Image/video gen" in all three Hub files. Studio Hub: one filter popover for capabilities, size, context and uploader, composer-style menus #13749 split the Hub filter into "Image gen" and "Video gen" and only rewrote the comments that held the old label in the other two.test_every_tracked_python_file_is_already_formattedandtest_checked_in_file_reads_name_an_encoding:tests/test_triton_fp_fusion.py(Kernels: request enable_fp_fusion=True explicitly, ahead of Triton 3.9's False default #13828) is not a fixed point ofscripts/run_ruff_format.pyand reads four kernel sources withread_text()and no encoding.test_calibration_revision_includes_the_companion_base:_calibration_revisionnow uses_peak_model_identity, which keys onsource@revisionplus+base@base_revisionfor a GGUF or single-file load, not the old bare fingerprint and|base=suffix.Fix
diffusion_measured_peaks.py:encoding = "utf-8"on the read and on the write.json.dumpwrites ASCII by default, so existing peak files read the same.stream_window_pad_mibpatched to 0), the case Studio diffusion: learned activation peaks, OOM retry in group offload setup, pinned GGUF host copies, tied-weight groups #13724 still records.pytest.importorskip("diffusers.hooks"), the same guard the rest of the file uses for optional dependencies. It still runs where diffusers is installed.{ value: "diffusion", label: "Image/video gen" }inmodel-type-filter.tsand the splitImage gen/Video genoptions inview-models.ts.tests/test_triton_fp_fusion.py:encoding = "utf-8"on its four reads, thenpython scripts/run_ruff_format.pyon it.Tests
With no GPU visible (as on the CI runners),
test_diffusion_component_sizes.py,test_text_io_encoding.pyandtest_diffusion_learned_peaks.py: 4 failed on main, 984 passed and 0 failed here (with current main merged in).tests/test_runtime_text_encoding.py: 9 passed.tests/studio/test_model_picker_contracts.py: 201 passed.tests/test_triton_fp_fusion.py,tests/test_formatter_fixed_point.py,tests/test_source_read_encoding.py,tests/test_runtime_text_encoding.py: 43 passed, 2 skipped. The OOM test skips cleanly when diffusers is not importable, and passes where it is.