fix: align MRV2 profiling and capture with vLLM 0.31

Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
This commit is contained in:
tzhouam committed 2026-10-03 22:03:13 +08:00
1 parent 16f73d0da2
commit 43e05c6e13
7 files changed
+81 -12

No files matched your search

@@ -20,6 +20,17 @@ from vllm_omni.worker_v2.omni_generation_model_runner import OmniGenerationModel
pytestmark = [pytest.mark.core_model, pytest.mark.cpu]
@pytest.mark.parametrize("randomize_inputs", [False, True])
def test_profile_run_accepts_release_flag_without_running_codec(monkeypatch, randomize_inputs):
runner = object.__new__(OmniGenerationModelRunner)
runner.model = MagicMock(side_effect=AssertionError("profiling ran codec model"))
synchronize = MagicMock()
monkeypatch.setattr(torch.accelerator, "synchronize", synchronize)
runner.profile_run(randomize_inputs=randomize_inputs)
synchronize.assert_called_once_with()
runner.model.assert_not_called()
class _FakeStagedField:
def __init__(self, data):
self.np = data