Repository navigation
Report prompt KV weight versions in generation metadata - #44164
Conversation
|
/rerun-test test/registered/rl/test_weight_version_spans.py |
|
|
AI-assisted validation report (Codex), requested by the PR author. Not ready to merge: the exact head has failing new unit tests.
Failure:
Suggested correction: initialize the fixture's unrelated cache dependency ( Reproduction on the exact head in the environment above: python -m pytest -q test/registered/unit/hardware_backend/mlx/test_attention_patching.py test/registered/unit/managers/test_batch_result_processor_hidden_states.py test/registered/unit/managers/test_batch_result_processor_mamba_boundary.py test/registered/unit/managers/test_batch_result_processor_spec_grammar.py test/registered/unit/managers/test_msgpack_ipc_roundtrip.py test/registered/unit/managers/test_multi_tokenizer_mixin.py test/registered/unit/managers/test_output_streamer_customized_info.py test/registered/unit/managers/test_scheduler_weight_version_tracking.py test/registered/unit/mem_cache/test_kv_weight_version_tracker.py test/registered/unit/model_executor/test_model_runner_kv_weight_versions.py test/registered/unit/server_args/test_server_args.py test/registered/unit/utils/test_weight_versions.py --junitxml=/scratch/pr44164-unit.xmlLimitations:
|
|
AI-assisted validation follow-up (Codex), requested by the PR author.
|
Add optional per-slot KV weight-version tracking and expose run-length encoded prompt provenance through generation metadata, including cache reuse and abort responses. Capture target write locations and serving versions alongside routed-expert capture. Carry records through the same result paths and finalize them beside routed-expert and indexer outputs after their existing synchronization. Centralize optional tracker creation and reject encoder-decoder, embedding/reward, and pipeline-parallel configurations when enabled. Include unit coverage and speculative multi-turn cache-reuse assertions. Align regression tests with the existing merged IPC role field and session-end version publication contract. Keep strict schema and pre-publication assertions. Limit long test generations to 3072 tokens so prompt plus completion fits the 4096-token CI model context; retain all boundary and abort assertions. Validated on two H200 GPUs: 263 unit tests and 24 RL tests passed, including EAGLE, DP Attention, and multi-turn prefix reuse.
653fbdd to
99d65b8
Compare
|
AI-assisted follow-up (Codex), requested by the PR author.
Reproduce the focused regression at the new head: python -m pytest -q \
test/registered/unit/managers/test_scheduler_weight_version_tracking.py::TestSchedulerBatchWeightVersion::test_pending_result_uses_version_captured_when_batch_ran \
test/registered/unit/managers/test_scheduler_weight_version_tracking.py::TestSchedulerBatchWeightVersion::test_result_copy_finishes_before_slot_indices_are_consumed \
test/registered/unit/managers/test_scheduler_weight_version_tracking.py::TestSchedulerBatchWeightVersion::test_spec_decode_does_not_restamp_restored_prefill_slots |
Cherry-picked from sglang-miles (f312781). Miles main reads --sglang-enable-prefill-weight-versions on every rollout, and only an import block in test_scheduler_weight_version_tracking.py conflicted.
… metadata (sgl-project#44164) (cherry picked from commit 36b1d3b) (conflict resolved: io_struct.py AbortReq keeps only prefill_weight_versions; the prefix field belongs to c40cd81, which is not picked) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDwTQn4gGFgVhzGXFs4aJx
… metadata (sgl-project#44164) (cherry picked from commit 36b1d3b) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDwTQn4gGFgVhzGXFs4aJx
…lative truncation (sgl-project#43387) Conflict resolved by hand: test/registered/unit/managers/test_batch_result_processor_spec_grammar.py, imports only; sglang-miles [41/42] (sgl-project#44164) added the KvWeightVersionTracker import where this commit adds release_kv_cache and get_context, and all three are kept. (cherry picked from commit 86e67f7) Claude-Session: https://claude.ai/code/session_01VDwTQn4gGFgVhzGXFs4aJx
…lative truncation (sgl-project#43387) Conflict resolved by hand: test/registered/unit/managers/test_batch_result_processor_spec_grammar.py, imports only; sglang-miles [41/42] (sgl-project#44164) added the KvWeightVersionTracker import where this commit adds release_kv_cache and get_context, and all three are kept. (cherry picked from commit 86e67f7) Claude-Session: https://claude.ai/code/session_01VDwTQn4gGFgVhzGXFs4aJx
…lative truncation (sgl-project#43387) Conflict resolved by hand: test/registered/unit/managers/test_batch_result_processor_spec_grammar.py, imports only; sglang-miles [41/42] (sgl-project#44164) added the KvWeightVersionTracker import where this commit adds release_kv_cache and get_context, and all three are kept. (cherry picked from commit 86e67f7)
CI States
Latest PR Test (Base): ❌ Run #38503948215
Latest PR Test (Extra): ❌ Run #38503948193
Latest PR Test (AMD ROCm 10): ❌ Run #38503948175