Skip to content

Tests: four repo-wide reds on main (gloo banner, klein 9B host RAM, NVFP4 nested kernel, Kaggle input via env) - #19027

Merged
danielhanchen merged 1 commit into
mainfrom
fix/main-reds-gloo-banner-nvfp4-nesting
Nov 23, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/main-reds-gloo-banner-nvfp4-nesting

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Four tests are red on main and fail on every PR whose staging run includes them (seen on #18918, #18925 and #19000). Each was reproduced on main before fixing. In all four the code under test is right and the test is not.

Failing test (shard) Introduced by Cause Fix
test_diffusion_ddp_effective_precision.py::test_real_gloo_two_ranks[fp8,*] ((Python 3.13, diffusion)) #18967 The verdicts are right (SAME, REFUSED ...), but gloo prints [Gloo] Rank N is connected to 1 peer ranks ... on the child's stdout first, and the test required the output to start with the verdict. Read the verdict from the child's last line.
test_diffusion_base_precision.py::test_resolve_auto_uses_klein_variant_size and test_auto_sizes_flux2_klein_9b_off_its_own_weights[*] ((Python 3.13, diffusion)): 'nf4' == 'fp8' #18967 Near the 8-bit band (20 GB free against the 18.2 GB dense 9B), Auto's fp8 pick also checks host RAM through _auto_swap_host_ram_ok, because that load holds the bf16 base on the host. The tests fake the GPU but read the runner's real RAM, so a 16 GB CI runner gets nf4 (correctly) and a large dev box gets fp8. An autouse fixture pins host RAM high, like the file's existing _not_rocm pin, since these cases simulate GPU tiers. New test_klein_9b_near_the_8bit_band_falls_back_to_nf4_on_a_small_host pins the small-host fallback explicitly.
tests/test_nvfp4_qat_backward_skip.py::test_cpu_forward_kernel_is_restored_on_exit (Repo tests (CPU, rest)): there's already a kernel registered from python overriding nvfp4_qat_linear_v2's behavior for CPU #18864 The test enters _cpu_forward_kernel(op) inside the module-scoped op fixture, which has already registered that kernel. torch 2.10 refuses a second Python registration for the same op, key and namespace, so the test fails on every run. The op fixture is per test, and the restore test takes the bare op (new raw_op fixture), so it checks a real register-then-restore from a clean state.
tests/kaggle/test_fire_and_forget.py::test_every_gate_budget_covers_the_reaper_window (Repo tests (CPU, rest-2)): the collector's default age ceiling is not readable from the workflow #18969 #18969 correctly moved the dispatch input out of the script into MAX_AGE_HOURS: ${{ inputs.max_age_hours || '3' }}, and the test's regex only knew the inline form. Read the default from either form, and when it is an env var, assert that variable is what reaches --max-age-hours.

Only tests change.

Testing

  • The four files: all red on main. With this change, 98 passed / 6 skipped (the two diffusion files) and 125 passed (the NVFP4 and Kaggle files); tests/kaggle/ as a whole: 1081 passed.
  • Sabotage, each guard still catches what it is for:
    • gloo: making check_effective_precision a no-op fails the REFUSED case.
    • klein: removing the host RAM gate from _resolve_base_precision fails the new small-host test. Forcing a 16 GB runner over the whole file fails the same 5 cases CI did, plus the new one.
    • NVFP4: keeping the test library alive instead of destroying it fails the restore test.
    • Kaggle: a workflow default of 9 fails (it no longer matches collect.DEFAULT_MAX_AGE_HOURS), and so does not passing $MAX_AGE_HOURS to --max-age-hours (MAX_AGE_HOURS never reaches --max-age-hours).

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T08:36:50.444589Z de31742 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: de31742a6f

ℹ️ 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".

@danielhanchen
danielhanchen merged commit 16eff5e into main Nov 23, 2026
@danielhanchen
danielhanchen deleted the fix/main-reds-gloo-banner-nvfp4-nesting branch November 23, 2026 08:37
danielhanchen added a commit that referenced this pull request Nov 23, 2026
…ut, kill on timeout (#19044)

## Summary

`(Python 3.13, diffusion)` intermittently fails
`studio/backend/tests/test_diffusion_ddp_effective_precision.py::test_real_gloo_two_ranks[fp8,fp8-SAME]`
with `subprocess.TimeoutExpired` after 180 s, for example the staging
run for #19024 on a base that already has #19027. Locally the test takes
about 1.4 s per case, so this is a hang, not a slow runner.

The log has nothing to go on: the two ranks' stderr is not captured, a
rank stuck in a Gloo collective waits out Gloo's 30 minute default, and
on timeout the children are left running.

## Change

`studio/backend/tests/test_diffusion_ddp_effective_precision.py` only;
no product code changes, and the checks are the same.

- Child: `init_process_group(..., timeout=timedelta(seconds=60))`, so a
stuck collective raises inside the rank with its own error instead of
hanging.
- Parent: each rank writes stdout and stderr to files under `tmp_path`
instead of pipes, so one rank cannot block on a full pipe while the
other is being waited on.
- Both ranks share one 180 s deadline. On expiry both are killed and the
test fails with each rank's return code, stdout and stderr, so the next
occurrence names the stuck rank and where it was.
- A nonzero exit also reports both ranks' output.

This bounds the hang and makes it diagnosable; it does not claim a root
cause, since no failing run has captured the ranks' output yet.

## Testing

- The file: 13 passed, also under `-n 2`.
- Sabotage, rank 1 stalled before `init_process_group` (deadline
shortened for the check): the test fails after the deadline with `rank 0
rc=-9` / `rank 1 rc=-9` and both outputs, and no child process is left
behind.
- Sabotage, rank 1 exits right after init: rank 0 reports the closed
connection and the test fails on the verdict within seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant