Skip to content

Fix main Backend CI: PP layer name on transformers 5.17, INT8 attention without Triton, kernel and test gates - #17882

Merged
danielhanchen merged 9 commits into
mainfrom
fix-main-ci-red-20261115
Nov 16, 2026
Merged

danielhanchen merged 9 commits into
mainfrom
fix-main-ci-red-20261115

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Backend CI on main has been red since today's merges. Every failure traces to one commit; this fixes the unsloth side (the gloo-cp shard also needs unslothai/unsloth-zoo#2542, since CI installs zoo from main).

CI shard / test Cause Fix
gloo: test_qwen4exp_parallel_matches_one_process[pp*], test_pp_splits_streams_and_runs_the_mixer_last, all of test_frozen_table_pp_gloo.py #17785: transformers 5.17 (the CI pin) names the Qwen4Exp layer type qwen_sparse_attention, 5.22 renamed it indexed_attention; pipeline parallel only accepted the new name, so every rank raised "hybrid layer stacks" accept both names in _PP_HYBRID_FAMILIES
diffusion (Python 3.13): 13 tests in test_diffusion_int8_attention_triton_device.py #17855: _launch read triton.runtime while triton is None on that shard check triton is not None first
rest: test_every_constexpr_line_has_a_comment #17860: 23 uncommented tl.constexpr parameters in large_head_attention.py comments added; _tma_tile's signature split one parameter per line
rest: test_every_launch_requests_fp_fusion #17860: the _launch helper forwards enable_fp_fusion from every caller, but the gate did not know it is a helper registered like layernorm.py's
rest: test_no_file_is_dropped_or_run_twice #17868: tests/test_ddp_push_rank0_gloo.py matched both the gloo shard and rest-2's test_[dimsu]*.py renamed tests/test_hub_push_rank0_ddp_gloo.py
rest-2: test_checked_in_file_reads_name_an_encoding #17867: read_text() without an encoding in tests/test_bind_local_cuda_device.py encoding = "utf-8"
rest-2: test_sentence_transformer_trainer_checks_the_placement_before_the_deferred_compile[*] #17859: patch_train_dataloader assumed every trainer class has get_train_dataloader skip the patch when the method is missing
rest-2: test_router_aux_loss_gradient_survives_unsloth_checkpointing[*] #17873: the gpu-marked test still runs under CI's -m 'not server and not e2e' has_real_accelerator() skip next to the gpu mark
studio: test_no_skip_guard_reads_a_spoofable_accelerator_probe #17850: test_block_cudagraphs_side_grad.py skipped on torch.cuda.is_available(), which the CUDA spoof fakes skip on has_real_cuda()

Tests

In a venv matching CI (Python 3.12, torch 2.10.0+cpu, transformers 5.17.0, TRL 1.15, PEFT 0.21.3, UNSLOTH_COMPILE_DISABLE=1, -m 'not server and not e2e'):

  • gloo: test_qwen4exp_parallel_gloo.py failed on main, 9 / 9 pass here; test_frozen_table_pp_gloo.py 13 / 13.
  • rest / rest-2 / studio: the nine affected files had exactly CI's 9 failures on main; 153 passed / 6 skipped here.
  • diffusion: with Triton blocked (as on the Python 3.13 shard), the 13 failures pass here; with Triton present everything passes.

The only non-test code changes are the PP layer-type name, the Triton None check and the Sentence Transformers method check; large_head_attention.py changes are comments only.

…ayer type for Qwen4Exp

transformers 5.17 names the QSA layer type qwen_sparse_attention (5.22 renamed it
indexed_attention), so the CPU CI (transformers 5.17) refused every Qwen4Exp PP run
added in #17785.
_launch read triton.runtime with triton None (the Python 3.13 diffusion shard has no
Triton), so the stubbed-launcher device tests from #17855 raised AttributeError.
…e _launch helper

#17860 left 23 tl.constexpr parameters without a comment, and its _launch helper
forwards enable_fp_fusion from every caller, which the fp fusion gate now checks per
call as it does for layernorm.py.
…cts it

tests/test_ddp_push_rank0_gloo.py (#17868) matched both the gloo shard and rest-2's
tests/test_[dimsu]*.py glob.
… aux loss GC test

test_bind_local_cuda_device.py read __init__.py with the platform encoding (#17867);
test_block_cudagraphs_side_grad.py gated on the spoofable torch.cuda.is_available()
(#17850); test_moe_aux_loss_checkpointing.py (#17873) is gpu-marked but CI's -m
override runs it, and unsloth gradient checkpointing pins host memory, so it now
also skips without a real accelerator.
…ithout get_train_dataloader

#17859's patch_train_dataloader assumed a transformers Trainer subclass and raised
AttributeError on other trainer classes (the stand-in in test_mixed_nvidia_capabilities).
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 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-16T01:24:20.041116Z d55c17a 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. Can't wait for the next one!

Reviewed commit: d55c17a004

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

[skip ci]
@danielhanchen
danielhanchen merged commit aa5fc70 into main Nov 16, 2026
@danielhanchen
danielhanchen deleted the fix-main-ci-red-20261115 branch November 16, 2026 04:46
danielhanchen added a commit that referenced this pull request Nov 16, 2026
…iniMax LoRA sidecar read (#17913)

## Summary

Two checks are red on main right now:

1. **`Repo tests (CPU, rest)`:
`tests/test_ci_repo_cpu_shards.py::TestEveryGlobRootMatchesAFile::test_no_shard_hands_pytest_an_unexpanded_pattern`**

   ```
AssertionError: these shard globs match no test file: [('gloo',
'tests/test_t[!p]*gloo*.py')]
   ```

#17892 added `tests/test_t[!p]*gloo*.py` to the gloo shard so that
`tests/test_tokenizer_save_ddp_gloo.py` (from #17862) was collected by
some shard. #17882 landed at the same time and renamed that file to
`tests/test_local_save_tokenizer_ddp_gloo.py`, which the gloo shard's
first glob (`tests/test_[!dfimpstu]*gloo*.py`) already covers. The
`test_t[!p]` glob now matches nothing, and an unmatched glob reaches
pytest as a literal path. Both PRs were right on their own; together
they leave one dead glob.

2. **`(Python 3.13, rest)` and `Repo tests (CPU, rest)`: the text I/O
encoding gates**

   ```
   test_text_io_names_its_encoding[diffusion_minimax_h3_image.py]
assert not ['diffusion_minimax_h3_image.py:3422: read_text() without
encoding']
   ```

#17863 added `json.loads(sidecar.read_text())` for the LoRA
`adapter_config.json` sidecar. Without an encoding that read uses the
locale codepage on Windows.

## Change

- `.github/workflows/studio-backend-ci.yml`: remove
`tests/test_t[!p]*gloo*.py` from the gloo shard and restore the comment
that a `test_t[!p]*` gloo file would be reported as dropped by
`tests/test_ci_repo_cpu_shards.py` (with a note on why the glob is not
kept for later: an unmatched glob is a missing file to pytest).
- `studio/backend/core/inference/diffusion_minimax_h3_image.py`:
`sidecar.read_text(encoding = "utf-8")`. JSON is UTF-8, so behaviour on
Linux and macOS is unchanged.

## Testing

- `tests/test_ci_repo_cpu_shards.py` and
`test_text_io_encoding.py::test_text_io_names_its_encoding[diffusion_minimax_h3_image.py]`:
16 passed on this branch, 2 failed on main.
- `tests/test_runtime_text_encoding.py` and
`studio/backend/tests/test_diffusion_minimax_h3_image.py` pass;
`studio/backend/tests/test_text_io_encoding.py` passes for every tracked
file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant