Skip to content

Merge the HF real-checkpoint MultiSwitch tests and mark the real-model tests release - #174

Open
noaakl wants to merge 2 commits into
mainfrom
feature/release-tests
Open

noaakl wants to merge 2 commits into
mainfrom
feature/release-tests

Conversation

@noaakl

@noaakl noaakl commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #167. Puts the tests gated on GRANITE_SWITCH_E2E_MODELS into the release tier, following the per-file audit of those tests.

Changes

Merge the 4 HF real-checkpoint files into one. test_multi_switch_{e2e,alora,mixed_tech,realistic}.py -> tests/hf/test_multi_switch_real_checkpoint.py (31 tests). They overlapped and carried three near-identical compose helpers; _realistic borrowed _e2e's model. One helper now builds multi, multi-alora and multi-mixed (same output dir names, so warm reuse still works). No checks dropped.

Fix: repeated --adapters kept only the last repo list. multi-mixed was being built from guardian only, so the "mixed LoRA + aLoRA" tests never had a mix. All repos now follow a single --adapters. Pipeline-parallel equivalence uses the shared helper instead of its own copy.

Fix: conversation adapter-map regex matched no aLoRA entry. aLoRA entries in the composed template now carry 'invocation_drop_chars': N after invocation_text; the regex required } right after it, so the prefix-cache and concurrency tests found 0 aLoRA adapters and bailed out. New CPU test tests/unit/test_conversation_adapter_map_parse.py parses templates built by the real composer from the real Granite template fixtures, in both formats (role-marker and ChatML), so the next format change fails on PRs.

Release markers on: the merged HF file, test_multi_switch_vllm_generate, test_multi_switch_serving_e2e, test_multi_switch_alora_cache, test_conversation_prefix_cache, test_pipeline_parallelism_equivalence. Listed in docs/CICD.md. test_conversation_concurrency stays out: it never composes a checkpoint and needs one pre-built at GRANITE_SWITCH_CONV_DIR.

The release marker is now the only gate. These 7 files (the 6 above plus test_quantization) no longer also skip unless GRANITE_SWITCH_E2E_MODELS=1, and the tests/conftest.py shim that set that variable for -m release runs is gone. pytest -m release runs them; the variable has no effect on them any more. (test_conversation_concurrency, not a release test, keeps its gate.)

Mixed-checkpoint guard. New TestMixed::test_checkpoint_is_mixed fails unless multi-mixed holds both LoRA and aLoRA adapters. The other mixed tests skip a missing technology, so without it a checkpoint that lost one (as multi-mixed did before the --adapters fix) would pass as skipped.

Not in this PR: converting these files to fakes for PR runs.

Testing

Vela, 2x A100, vLLM 0.26 (uv sync --frozen --group test), PR head d6c9312 + the review fixes:

Scope Result
tests/unit 1799 passed, 2 skipped
tests/hf/test_multi_switch.py 297 passed
Default run of the release files 56 deselected
-m release on the 7 files 55 passed, 1 failed, 0 skipped

The failure: test_pp2_matches_pp1_token_equivalence. PP=1 and PP=2 diverge at token 2 (145 vs 220). It is not caused by the review fixes: it fails identically on d6c9312 with them reverted. It passed on the earlier run of the same branch content (2026-11-17), so something outside the code changed in between; not yet investigated. test_batched_generation_matches_solo, which failed once on that earlier run, passed here.

Note for anyone with a persistent GRANITE_SWITCH_E2E_DIR: delete multi-mixed there once. Checkpoints are reused whenever config.json exists, so the old guardian-only build would keep being used.

…e real-model tests release

- Replace test_multi_switch_{e2e,alora,mixed_tech,realistic}.py with
  test_multi_switch_real_checkpoint.py: one compose helper for the multi,
  multi-alora and multi-mixed checkpoints instead of three copies. Point
  vllm_generate's import, comments and MULTISWITCH_EXPLAINED.md at it.
- Pass all repos after a single --adapters flag (a repeated flag keeps only
  the last list), so multi-mixed really gets rag + guardian; pipeline-parallel
  equivalence now uses the shared helper instead of its own copy.
- Let the conversation adapter-map regex accept trailing fields: aLoRA entries
  now carry invocation_drop_chars, and the old regex matched no aLoRA entry.
  Add a CPU unit test that parses a template built by the real composer.
- Mark the real-checkpoint HF, vLLM-generate, serving, aLoRA-cache, prefix-cache
  and pipeline-parallel tests release, and list them in docs/CICD.md.
  test_conversation_concurrency stays out: it never composes a checkpoint.

Signed-off-by: noaa <noaa.kless@gmail.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@aviv1ron1 aviv1ron1 self-assigned this Nov 17, 2026
@aviv1ron1

Copy link
Copy Markdown
Collaborator

@noaakl currently these tests are dependent on two "switches" release tag and GRANITE_SWITCH_E2E_MODELS=1 which is cumbersome and confusing.
Can you put them as release tests only and remove the check against GRANITE_SWITCH_E2E_MODELS?
This way they always run on release and the logic is simpler.

Removes it from the 7 files and the conftest shim that set it for
-m release. Also adds TestMixed::test_checkpoint_is_mixed and moves
the adapter-map parse test onto make_stub_tokenizer (both formats).

Signed-off-by: noaa <noaa.kless@gmail.com>
@aviv1ron1

Copy link
Copy Markdown
Collaborator

/gpu-test

@github-actions

Copy link
Copy Markdown

✅ GPU tests passed — vllm26

3052 passed, 21 skipped, 209 deselected, 21 warnings in 5678.58s (1:34:38)

Commit: 3f49804f19127d2601dca0292167ca736ac9d96e
Full run & artifact log

Last 40 log lines
  <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute

<frozen importlib._bootstrap>:488
  <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute

.venv/lib/python3.12/site-packages/torch/jit/_script.py:365: 14 warnings
  /tmp/granite-switch/.venv/lib/python3.12/site-packages/torch/jit/_script.py:365: DeprecationWarning: `torch.jit.script_method` is deprecated. Please switch to `torch.compile` or `torch.export`.
    warnings.warn(

tests/composer/test_compose_e2e.py:117
  /tmp/granite-switch/tests/composer/test_compose_e2e.py:117: PytestUnknownMarkWarning: Unknown pytest.mark.xdist_group - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.xdist_group("compose_e2e")

tests/composer/test_multi_audio_compose_e2e.py:132
  /tmp/granite-switch/tests/composer/test_multi_audio_compose_e2e.py:132: PytestUnknownMarkWarning: Unknown pytest.mark.xdist_group - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.xdist_group("multi_audio_compose_e2e")

tests/composer/test_multi_audio_compose_e2e.py:138
  /tmp/granite-switch/tests/composer/test_multi_audio_compose_e2e.py:138: PytestUnknownMarkWarning: Unknown pytest.mark.xdist_group - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.xdist_group("multi_audio_compose_e2e")

tests/composer/test_multi_audio_compose_e2e.py:249
  /tmp/granite-switch/tests/composer/test_multi_audio_compose_e2e.py:249: PytestUnknownMarkWarning: Unknown pytest.mark.xdist_group - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.xdist_group("multi_audio_compose_e2e")

tests/composer/test_upstream_files.py:232
  /tmp/granite-switch/tests/composer/test_upstream_files.py:232: PytestUnknownMarkWarning: Unknown pytest.mark.xdist_group - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.xdist_group("upstream_build_e2e")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
== 3052 passed, 21 skipped, 209 deselected, 21 warnings in 5678.58s (1:34:38) ==
sys:1: DeprecationWarning: builtin type swigvarlink has no __module__ attribute
[rank0]:[W1130 17:07:50.476544212 ProcessGroupNCCL.cpp:1575] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())
===== ALL GPU TESTS PASSED =====
[17:08:00] <job> Succeeded
[17:08:03] verified: found success sentinel in pod log
[17:08:03] cleanup: deleting <job> (exit=0)
<job> "<job>" deleted

Verdict: PASSED

@github-actions

Copy link
Copy Markdown

✅ GPU tests passed — vllm32

3051 passed, 22 skipped, 209 deselected, 40 warnings in 5731.15s (1:35:31)

Commit: 3f49804f19127d2601dca0292167ca736ac9d96e
Full run & artifact log

Last 40 log lines
  /tmp/granite-switch/.venv/lib/python3.12/site-packages/flashinfer/gemm/kernels/grouped_gemm_masked_blackwell.py:2391: DeprecationWarning: cutlass.utils.LayoutEnum is deprecated; use cutlass.tensor_utils.LayoutEnum instead. It will be removed in a future release.
    c_layout: utils.LayoutEnum,

tests/vllm/test_probe_capture_safety.py::test_sr_pipeline_stack_partitions_post_attention_metadata
  /tmp/granite-switch/.venv/lib/python3.12/site-packages/flashinfer/gemm/kernels/cute_dsl/low_latency_blockscaled_gemm.py:102: DeprecationWarning: cutlass.utils.smem_allocator.get_smem_capacity_in_bytes is deprecated; use cutlass.memory.get_smem_capacity_in_bytes instead. It will be removed in a future release.
    _SMEM_CAPACITY_BYTES = cutlass.utils.get_smem_capacity_in_bytes("sm_100")

tests/vllm/test_probe_capture_safety.py::test_sr_pipeline_stack_partitions_post_attention_metadata
  /tmp/granite-switch/.venv/lib/python3.12/site-packages/flashinfer/gemm/kernels/grouped_gemm_masked_rubin.py:215: DeprecationWarning: cutlass.utils.LayoutEnum is deprecated; use cutlass.tensor_utils.LayoutEnum instead. It will be removed in a future release.
    c_layout: utils.LayoutEnum,

tests/vllm/test_probe_capture_safety.py::test_sr_pipeline_stack_partitions_post_attention_metadata
tests/vllm/test_probe_capture_safety.py::test_sr_pipeline_stack_partitions_post_attention_metadata
  /tmp/granite-switch/.venv/lib/python3.12/site-packages/flashinfer/gdn_kernels/blackwell/gated_delta_net_chunked.py:95: DeprecationWarning: cutlass.utils.TensorMapUpdateMode is deprecated; use cutlass.tensor_utils.TensorMapUpdateMode instead. It will be removed in a future release.
    from cutlass.utils import TensorMapManager, TensorMapUpdateMode

tests/vllm/test_probe_capture_safety.py::test_sr_pipeline_stack_partitions_post_attention_metadata
  /tmp/granite-switch/.venv/lib/python3.12/site-packages/flashinfer/gdn_kernels/delta_rule_dsl/collective_store_tma.py:6: DeprecationWarning: cutlass.utils.tensormap_manager.TensorMapUpdateMode is deprecated; use cutlass.tensor_utils.TensorMapUpdateMode instead. It will be removed in a future release.
    from cutlass.utils.tensormap_manager import TensorMapManager, TensorMapUpdateMode

tests/vllm/test_probe_capture_safety.py::test_sr_pipeline_stack_partitions_post_attention_metadata
tests/vllm/test_probe_capture_safety.py::test_sr_pipeline_stack_partitions_post_attention_metadata
  /tmp/granite-switch/.venv/lib/python3.12/site-packages/flashinfer/gdn_kernels/blackwell/gated_delta_net_cp_prefill.py:55: DeprecationWarning: cutlass.utils.TensorMapUpdateMode is deprecated; use cutlass.tensor_utils.TensorMapUpdateMode instead. It will be removed in a future release.
    from cutlass.utils import TensorMapManager, TensorMapUpdateMode

tests/vllm/test_probe_capture_safety.py::test_sr_pipeline_stack_partitions_post_attention_metadata
  /tmp/granite-switch/.venv/lib/python3.12/site-packages/flashinfer/cute_dsl/availability.py:136: DeprecationWarning: Arch from arch.py is deprecated. Use Arch from enums.py instead.
    from cutlass.base_dsl.arch import Arch

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
== 3051 passed, 22 skipped, 209 deselected, 40 warnings in 5731.15s (1:35:31) ==
sys:1: DeprecationWarning: builtin type swigvarlink has no __module__ attribute
[rank0]:[W1130 17:08:29.910216804 ProcessGroupNCCL.cpp:1624] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())
===== ALL GPU TESTS PASSED =====
[17:08:56] <job> Succeeded
[17:09:00] verified: found success sentinel in pod log
[17:09:00] cleanup: deleting <job> (exit=0)
<job> "<job>" deleted

Verdict: PASSED

@aviv1ron1

Copy link
Copy Markdown
Collaborator

/gpu-test-release

This branch has not been deployed

No deployments
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.

3 participants