Skip to content

Locate the MTP drafter-drop fallback by its shape, not one spelling - #13922

Merged
danielhanchen merged 1 commit into
mainfrom
ci-mtp-probe-fallback-locator
Oct 15, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-mtp-probe-fallback-locator

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

(Python 3.13, rest) is red on main since #13806 (1be7795), including on #13909's own run:

FAILED studio/backend/tests/test_tensor_parallel.py::test_mtp_decode_probe_wired_under_tensor_parallel
AssertionError: the probe must precede the drafter-drop fallback

#13806 is right. It made an EAGLE-3 drafter droppable on a failed load like the others, so the fallback in LlamaCppBackend.load_model became

if (
    not healthy
    and (
        _spec_requested_mtp
        or _spec_requested_dspark
        or _spec_requested_dflash
        or _spec_requested_eagle3
    )
    and not _load_cancelled()
):

The test located that block with src.find("and (_spec_requested_mtp or _spec_requested_dspark or _spec_requested_dflash)"), the old one-line spelling. After the change find returns -1, so 0 <= probe < fallback fails even though the probe still comes first. The ordering it guards is intact.

The test now finds the fallback by its shape: not healthy and ( followed by the _spec_requested_mtp or _spec_requested_dspark ... _spec_requested_dflash alternatives, whitespace and line breaks allowed, so adding another drafter kind or rewrapping does not break it. If no such block exists it fails with its own message (load_model no longer has a drafter-drop fallback for MTP) rather than reporting a misleading order failure.

Verification:

  • studio/backend/tests/test_tensor_parallel.py: fails on main as above, 111 passed with this change.
  • Sabotage, _spec_requested_dflash removed from the fallback in llama_cpp.py: fails with load_model no longer has a drafter-drop fallback for MTP.
  • Sabotage, the fallback block moved ahead of the probe in the source the test reads: fails with the probe must precede the drafter-drop fallback.
  • tests/test_formatter_fixed_point.py: passes.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T19:31:21.827182Z 1928698 Manual request
🔒 Security Review ⚠️ Failed 2026-10-15T19:30:14.443275Z 1928698 PR opened
ℹ️ 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 Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-15T19:30:13.394436Z 1928698 PR opened
🔒 Security Review 🔄 Running since 2026-10-15T19:30:10.623831Z 1928698 PR opened
ℹ️ 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. Delightful!

Reviewed commit: 1928698892

ℹ️ 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 bd06376 into main Oct 15, 2026
@danielhanchen
danielhanchen deleted the ci-mtp-probe-fallback-locator branch October 15, 2026 19:36
danielhanchen added a commit that referenced this pull request Oct 15, 2026
…p guards (#13936)

Two more checks are red on main (7382805), seen on #13915 and
#13922's run, both reproduced locally on main.

## `test_no_raw_pixel_text_utilities` (from #13850)

```
Raw px text utilities ignore the UI font size preference; use the text-ui-* / leading-ui-* tokens in index.css instead:
  features/studio/sections/token-preview-dialog.tsx: text-[12.5px]
  features/studio/sections/token-preview-dialog.tsx: text-[9px]
```

The new token preview dialog sized three text runs with raw
`text-[12.5px]` / `text-[9px]`, so they stay fixed when the user changes
Settings > UI font size while the rest of Studio scales. The contract is
right and the dialog is what changes. `index.css` has exact tokens for
both sizes, `--text-ui-12p5: calc(0.78125rem * var(--ui-font-scale, 1))`
and `--text-ui-9: calc(0.5625rem * var(--ui-font-scale, 1))`, so this
swaps to `text-ui-12p5` / `text-ui-9`. At the default scale of 1 those
resolve to the same 12.5px and 9px, so the dialog renders the same as
today; the only difference is that it now follows the font size setting.
No screenshots: there is nothing visible to compare at the default
scale.

## `test_no_skip_guard_reads_a_spoofable_accelerator_probe` (from #13830
and #13889)

```
test_fp8_rowwise_gemv_blackwell_gate.py:47: torch.cuda.is_available()
test_norm_fast_launch.py:189: torch.cuda.device_count()
```

`tests/_zoo_aggressive_cuda_spoof.py` patches the torch.cuda probes to
report a GPU process-wide for the version-compat suites, so a skip guard
that reads them un-skips on a CPU-only runner whenever it shares a
pytest session with those suites. Both guards now ask `has_real_cuda()`
from `tests/_shared/real_accelerator.py` (answered before any spoof),
the form the rest of the tree uses: `not has_real_cuda()` for the FP8
GEMV exactness test, and `not has_real_cuda() or
torch.cuda.device_count() < 2` for the two-GPU norm test, matching
`test_rms_layernorm_multirow.py`. On a real GPU the predicate is the
same as before.

## Verification

- `tests/studio/test_ui_font_scale_contract.py`: fails on main as above,
12 passed here. Prettier clean.
- `tests/python/test_accelerator_skip_guards.py`: fails on main as
above, 24 passed here.
- On CPU, `test_fp8_rowwise_gemv_blackwell_gate.py` and
`test_norm_fast_launch.py`: 6 passed, 4 skipped (the GPU cases, with
their reasons), same as main.
- Not run here: the GPU cases themselves. This host's CUDA torch
environment fails bitsandbytes CUDA setup at collection, unrelated to
this change; the test bodies are untouched.
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