Disable mypy arg-type and assignment checks in tests (#59428)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
17e9295dd5
commit
fc2c801ad9
@@ -134,7 +134,7 @@ def test_piecewise_capture_uses_pcp_dummy_slot_mappings():
|
||||
device=torch.device("cpu"),
|
||||
max_num_reqs=num_reqs,
|
||||
max_num_tokens=num_tokens,
|
||||
block_tables=pcp_block_tables, # type: ignore[arg-type]
|
||||
block_tables=pcp_block_tables,
|
||||
)
|
||||
|
||||
block_tables = MagicMock()
|
||||
@@ -224,7 +224,7 @@ def test_speculator_capture_preserves_decode_query_bounds(
|
||||
)
|
||||
manager = SpeculatorCudaGraphManager.__new__(SpeculatorCudaGraphManager)
|
||||
manager.max_num_reqs = num_reqs
|
||||
manager.vllm_config = SimpleNamespace( # type: ignore[assignment]
|
||||
manager.vllm_config = SimpleNamespace(
|
||||
parallel_config=SimpleNamespace(data_parallel_size=1)
|
||||
)
|
||||
buffers = InputBuffers(num_reqs, num_tokens, torch.device("cpu"))
|
||||
|
||||
@@ -652,7 +652,7 @@ def test_eonly_capture_preserves_outputs_across_replay_and_fallback(profile_only
|
||||
encoder.device = device
|
||||
encoder.cudagraph_manager = manager
|
||||
runner = object.__new__(MMEncoderModelRunner)
|
||||
runner.model_state = SimpleNamespace(encoder_runner=encoder) # type: ignore[assignment]
|
||||
runner.model_state = SimpleNamespace(encoder_runner=encoder)
|
||||
# No decoder manager is installed: capture must be encoder-only.
|
||||
with patch(
|
||||
"vllm.v1.worker.mm_encoder_model_runner.lock_workspace", wraps=lock_workspace
|
||||
@@ -673,7 +673,7 @@ def test_eonly_capture_preserves_outputs_across_replay_and_fallback(profile_only
|
||||
with patch(
|
||||
"vllm.v1.worker.gpu.ec_connector.get_ec_transfer", return_value=connector
|
||||
):
|
||||
ec = ActiveECConnector(SimpleNamespace(), cache) # type: ignore[arg-type]
|
||||
ec = ActiveECConnector(SimpleNamespace(), cache)
|
||||
scheduled = cast(
|
||||
SchedulerOutput,
|
||||
SimpleNamespace(
|
||||
@@ -716,7 +716,7 @@ def test_eonly_without_encoder_graph_skips_capture():
|
||||
encoder = object.__new__(EncoderRunner)
|
||||
encoder.cudagraph_manager = None
|
||||
runner = object.__new__(MMEncoderModelRunner)
|
||||
runner.model_state = SimpleNamespace(encoder_runner=encoder) # type: ignore[assignment]
|
||||
runner.model_state = SimpleNamespace(encoder_runner=encoder)
|
||||
assert runner.capture_model() == 0
|
||||
|
||||
|
||||
@@ -1023,7 +1023,7 @@ class TestInitInvariantValidation:
|
||||
vllm_config = _MockVllmConfig(token_budgets, max_mm_items)
|
||||
model = _MockModel(min_budget, max_budget)
|
||||
return EncoderCudaGraphManager(
|
||||
vllm_config=vllm_config, # type: ignore[arg-type]
|
||||
vllm_config=vllm_config,
|
||||
device=torch.device("cpu"),
|
||||
dtype=torch.float32,
|
||||
model=model,
|
||||
|
||||
Reference in New Issue
Block a user