Skip to content

Fix the Inkling per-expert sync test and collect it in the weekly CPU run - #40725

Merged
ch-wan merged 2 commits into
mainfrom
cheng/hot-fix/inkling-per-expert-sync-context
Sep 22, 2026
Merged

ch-wan merged 2 commits into
mainfrom
cheng/hot-fix/inkling-per-expert-sync-context

Conversation

@ch-wan

@ch-wan ch-wan commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

test/srt/models/test_inkling_per_expert_sync.py fails all four of its cases on main.

It saves and restores get_moe_expert_parallel_world_size, get_moe_expert_parallel_rank and get_moe_tensor_parallel_rank on sglang.srt.models.inkling, then reassigns them to drive a simulated EP x MoE-TP grid. The loader stopped importing those names, so setUp raises AttributeError before any case does work, and the assignments would in any event have created three attributes nothing reads.

Nothing reported this, because the file sits under test/srt/, which no workflow collects.

Modifications

  • The test publishes the topology its rank is standing in and lets the loader read the placement off the context, the same way it does in a real process. MoE-TP is what is left of TP after EP takes its share, so a global rank of ep_rank * tp_size + tp_rank under tp_size = ep_size * tp_size reproduces exactly the grid the test asserts over. lora_compatible_layout_enabled is still a module-level binding and stays a stub.
  • The file moves to test/registered/unit/models/ and carries register_cpu_ci(est_time=15, stage="weekly", runner_config="cpu"), so it is collected into the weekly CPU run.

Accuracy Tests

No production code changes; this is a test fix.

test_inkling_per_expert_sync.py goes from 4 failed to 4 passed, from its new path, on CPU.

Run in one process with unit/test_runtime_context.py to check the published topology is torn down rather than leaked into a neighbour: 170 passed.

Speed Tests and Profiling

Not applicable.

Checklist

Review and Merge Process

  1. Ping Merge Oncalls to start the process. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • Common commands include /tag-and-rerun-ci, /tag-run-ci-label, /rerun-failed-ci
  4. After green CI and required approvals, ask Merge Oncalls or people with Write permission to merge the PR.

CI States

Latest PR Test (Base): ❌ Run #35713663872
Latest PR Test (Extra): ❌ Run #35713663791
Latest PR Test (AMD ROCm 10): ❌ Run #35713663829

@ch-wan

ch-wan commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

/rerun-test test_inkling_per_expert_sync.py

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Results for /rerun-test test_inkling_per_expert_sync.py:

🚀 ubuntu-latest (1 test): ✅ View workflow run

cd test/ && python3 registered/unit/models/test_inkling_per_expert_sync.py

The per-expert sync test stubbed `get_moe_expert_parallel_world_size`,
`get_moe_expert_parallel_rank` and `get_moe_tensor_parallel_rank` on the model
module. The loader stopped importing those names, so the assignments created
three attributes nobody reads and the reads went to the real context, failing
all four cases with `AttributeError` on the saved-attribute lookup.

The rank now publishes the topology it is standing in, and the loader reads it
the same way it does in a real process.
It sat under `test/srt/`, which no workflow collects, so it went on failing
against a module that had stopped exporting the names it stubbed without
anything reporting it. Moving it into the registered tree and giving it a
weekly CPU registration makes that class of rot visible.
@ch-wan
ch-wan force-pushed the cheng/hot-fix/inkling-per-expert-sync-context branch from af3f3ec to ff51757 Compare September 22, 2026 10:01
@ch-wan
ch-wan merged commit db73f35 into main Sep 22, 2026
98 of 110 checks passed
@ch-wan
ch-wan deleted the cheng/hot-fix/inkling-per-expert-sync-context branch September 22, 2026 18:22
@ch-wan ch-wan changed the title Fix the Inkling per-expert sync test and collect it in the weekly CPU run [Fix] Fix the Inkling per-expert sync test and collect it in the weekly CPU run Sep 24, 2026
@ch-wan ch-wan changed the title [Fix] Fix the Inkling per-expert sync test and collect it in the weekly CPU run [Fix] Repair the Inkling per-expert sync test and collect it in the weekly CPU run Sep 24, 2026
@ch-wan ch-wan changed the title [Fix] Repair the Inkling per-expert sync test and collect it in the weekly CPU run Fix the Inkling per-expert sync test and collect it in the weekly CPU run Sep 24, 2026
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