[MyPy][3/N] Fix MyPy errors in test groups (part 3) (#55939)

Signed-off-by: Taimys <ffy2281693949@gmail.com>
Signed-off-by: Luyi Xiao <81631911+luyixiao95@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Luyi Xiao <81631911+luyixiao95@users.noreply.github.com>
Co-authored-by: Taimys <ffy2281693949@gmail.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Taimys
2026-09-30 11:06:07 +00:00
committed by GitHub
co-authored by Codex Luyi Xiao Taimys Harry Mellor Claude Opus 5.5
parent c4fa6f36a7
commit 5225f1bacb
118 changed files with 948 additions and 605 deletions
@@ -51,7 +51,7 @@ def _create_proposer(
target_parallel_config=ParallelConfig(),
method="extract_hidden_states",
num_speculative_tokens=num_speculative_tokens,
draft_model_config={
draft_model_config={ # type: ignore[arg-type]
"hf_config": {
"eagle_aux_hidden_state_layer_ids": layer_ids,
}
@@ -103,7 +103,7 @@ def test_proposer_initialization_missing_layer_ids():
target_parallel_config=ParallelConfig(),
method="extract_hidden_states",
num_speculative_tokens=1,
draft_model_config={
draft_model_config={ # type: ignore[arg-type]
"hf_config": {} # Missing eagle_aux_hidden_state_layer_ids
},
)
@@ -146,7 +146,7 @@ def test_prepare_next_token_ids_padded():
mock_input_batch.vocab_size = 100
mock_input_batch.num_tokens_no_spec = np.array([5] * num_requests)
mock_requests = {}
mock_requests: dict[str, CachedRequestState] = {}
for req_id in req_ids:
mock_request = mock.MagicMock(spec=CachedRequestState)
# Each request will have a backup next token id of 10, 20, 30, 40
@@ -363,7 +363,7 @@ def test_extract_hidden_states_text_only_config_regression():
target_parallel_config=ParallelConfig(),
method="extract_hidden_states",
num_speculative_tokens=1,
draft_model_config={
draft_model_config={ # type: ignore[arg-type]
"hf_config": {
"eagle_aux_hidden_state_layer_ids": [1, 2, 3, 4],
}
@@ -450,7 +450,7 @@ def test_extract_hidden_states_speculative_config_vlm():
target_parallel_config=ParallelConfig(),
method="extract_hidden_states",
num_speculative_tokens=1,
draft_model_config={
draft_model_config={ # type: ignore[arg-type]
"hf_config": {
"eagle_aux_hidden_state_layer_ids": [1, 2],
}