[multi-lora v2 7/7] Tinker gateway example and tests - #2849
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
de59fab to
066e208
Compare
0b2456a to
88fd1e3
Compare
066e208 to
680d990
Compare
88fd1e3 to
e8302d3
Compare
680d990 to
1b146e1
Compare
e8302d3 to
ca556bb
Compare
96d1cb8 to
762925a
Compare
7eb844e to
cbbc358
Compare
762925a to
0b69c17
Compare
cbbc358 to
4fc45b2
Compare
0b69c17 to
5e1130b
Compare
4fc45b2 to
a332142
Compare
5e1130b to
1287821
Compare
a332142 to
e5a93e0
Compare
1287821 to
40e81ab
Compare
e5a93e0 to
ef8b97d
Compare
40e81ab to
fae4014
Compare
ef8b97d to
e08973b
Compare
66cc789 to
e0c8358
Compare
fc48382 to
3f5da19
Compare
|
/rerun-test tests/e2e/lora/test_tinker_multi_tenant_gateway.py |
|
/rerun-test tests/e2e/lora/test_tinker_cookbook_gateway.py |
|
/rerun-test tests/e2e/megatron/test_qwen3_5_35b_a3b_lora_ci.py |
|
/rerun-test tests/e2e/megatron/model_scripts/test_nemotron_3_ultra_4layer_ci.py |
|
❌ The run never started: resolving the test file's execution plan failed. |
|
❌ The run never started: resolving the test file's execution plan failed. |
|
❌ The run never started: resolving the test file's execution plan failed. |
|
❌ The run never started: resolving the test file's execution plan failed. |
|
/rerun-test tests/e2e/lora/test_tinker_multi_tenant_gateway.py |
|
/rerun-test tests/e2e/lora/test_tinker_cookbook_gateway.py |
|
/rerun-test tests/e2e/megatron/test_qwen3_5_35b_a3b_lora_ci.py |
|
/rerun-test tests/e2e/megatron/model_scripts/test_nemotron_3_ultra_4layer_ci.py |
|
✅ |
|
✅ |
|
✅ |
|
✅ |
Co-authored with @yushengsu-thu.
Add the Qwen3-30B-A3B Tinker gateway launcher and an SDK marker-memorization client. The default recipe uses one eight-GPU node: four training GPUs (TP2/EP4), four sampling GPUs, and four adapter slots. The client exercises one adapter or concurrent tenant isolation through
--mode single/--mode multi.The launcher derives checkpoint storage from
output_dir, with a--save-diroverride, and creates its run ID per invocation. Bothprepareandservehave recorded command snapshots. The SDK example uses the configured adapter layout, including unembedding; HF target detection and LoRA conversion recognizelm_head.The gateway suite covers ordering, deduplication, batch/barrier planning, terminal-stream isolation, checkpoint ownership, lease cleanup, JSON/protobuf contracts, HTTP errors, and runtime translation. Existing sampler tests now exercise disk publication, snapshot resolution independently of the training lease, and training continuing after a sampling failure. Remove the obsolete sampler-push readiness test and backend fake method. No new test files are added.
The README and generated docs explain the shared checkpoint root, frozen base loading, immutable sampler directories, and on-demand engine loading. A sampler save does not contact inference engines or change pending gradients. Checkpoint load/save/export execution failures, including filesystem errors, terminate the shared trainer cell and server. Existing IO and gateway tests now expect propagation and dispatcher exit; obsolete continue-after-IO-failure cases are removed alongside a parameterized regression for dispatcher cancellation and background failure. Automatic training recovery/replay remains outside the current implementation.
The fixture now stops the service through
run()instead of managing its private task collections. Checkpoint assertions usecore/utils.py; the shutdown regression verifies that in-flight model creation and sampling do not outlive the dispatcher.The README names the actual
serve_qwen3_30b_a3b_tinker.pylauncher and documents versioned checkpoint publication. Its docs mirror is regenerated. The backend fake uses the shared writer, and sampler assertions call the extracted utility. The checkpoint suite covers a process exiting before or after link replacement and a subsequent retry.Stacked on #2845.
Validation:
pre-commit run --all-filesand incrementalgit diff --checkpassed on every updated component head. All previous heads remain ancestors; the final Unify HF snapshot and checkpoint writing #3198 tree exactly matches the reviewed implementation.tests/e2e/lora/test_slot_checkpoint_resume.py(Hopper, LoRA, 2-GPU stage). The tested final tree is Unify HF snapshot and checkpoint writing #3198fd63c7ec8c41c2e0a61d273f0cd5a3504275ada7, with Megatron73b54618f7e58e0f25f619bcfecbe2640765475a, Bridge40b930897717941cfe2bd9806f417e28bf1bfa65, PyTorch 2.13.0+cu130 and Transformer Engine 2.17.0. Checkpoints were on GPFS.pre-commit run --all-filespassed.run-ci-multi-lora; their first GPU validation is pending.ci-megatron-pr: 73b54618f7e58e0f25f619bcfecbe2640765475a
ci-sglang-pr: 02b5e123c490c988d21526d0dd7837fefdd0e1da
Router dependency: install the router wheel and standalone binary from the existing
cu130-torch213-x86_64/cu130-torch213-aarch64rolling releases inyueming-yuan/miles-wheels, using the normal/tmp/wheelsinstallation path. Both architectures were rebuilt on CPU devboxes fromradixark/sgl-router-for-miles@b6342a3515e259bbd1eb4db728035a4efbe4fdf9and verified to forwardreturn_indexer_topkandlora_backfill_paths. No commit-specific router release is required. The existingpr-2849Docker image has not been rebuilt by this change.Tinker GPU CI: add
tests/e2e/lora/test_tinker_multi_tenant_gateway.pyand enable the cookbook gateway test. Both carry themulti-loradomain, selected by the repository labelrun-ci-multi-lora, on 8 H200 GPUs. They share Qwen3-4B gateway setup (4 training GPUs, TP2/DP2; 4 sampling GPUs; rank-8 adapters). The multi-tenant client trains four distinct markers concurrently, exports each adapter, and checks loss decrease and its own sampled marker.Validation: the real CI selector selects exactly both enabled tests for
run-ci-multi-lora; mocked entrypoint checks confirm both client commands and launcher cleanup. Full pre-commit passed. GPU convergence, cookbook execution, and end-to-end tenant isolation have not yet been validated.ci-image-tag: pr-2849