Skip to content

Commit aecbbfa

Browse files
hychiang-gitclaude
andcommitted
fix: collapse single-item imports in test_mcore_qwen3vl per ruff
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Hung-Yueh Chiang <hungyuehc@nvidia.com>
1 parent e8101a7 commit aecbbfa

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

tests/gpu_megatron/torch/export/test_mcore_qwen3vl.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
qwen3vl_causal_lm_import,
3333
)
3434

35-
3635
# All mcore keys that a dense (non-MoE) Qwen3-VL model should have
3736
DENSE_MCORE_KEYS = {
3837
"word_embeddings",
@@ -60,9 +59,7 @@ class TestQwen3VLRegistration:
6059
"""Test that Qwen3-VL is registered in the global mapping."""
6160

6261
def test_registered_in_export_mapping(self):
63-
from modelopt.torch.export.plugins.mcore_common import (
64-
all_mcore_hf_export_mapping,
65-
)
62+
from modelopt.torch.export.plugins.mcore_common import all_mcore_hf_export_mapping
6663

6764
assert "Qwen3VLForConditionalGeneration" in all_mcore_hf_export_mapping
6865
assert (
@@ -71,9 +68,7 @@ def test_registered_in_export_mapping(self):
7168
)
7269

7370
def test_registered_in_import_mapping(self):
74-
from modelopt.torch.export.plugins.mcore_common import (
75-
all_mcore_hf_import_mapping,
76-
)
71+
from modelopt.torch.export.plugins.mcore_common import all_mcore_hf_import_mapping
7772

7873
assert "Qwen3VLForConditionalGeneration" in all_mcore_hf_import_mapping
7974
assert (
@@ -278,9 +273,7 @@ def test_same_keys_as_qwen3(self):
278273
)
279274
def test_vl_adds_language_model_prefix(self, key):
280275
"""Qwen3-VL should have 'language_model.' inserted after 'model.'."""
281-
from modelopt.torch.export.plugins.mcore_qwen import (
282-
qwen3_causal_lm_import,
283-
)
276+
from modelopt.torch.export.plugins.mcore_qwen import qwen3_causal_lm_import
284277

285278
qwen3_prefix = qwen3_causal_lm_import[key].target_name_or_prefix
286279
qwen3vl_prefix = qwen3vl_causal_lm_import[key].target_name_or_prefix
@@ -289,9 +282,7 @@ def test_vl_adds_language_model_prefix(self, key):
289282

290283
def test_output_layer_same(self):
291284
"""lm_head is at root level for both Qwen3 and Qwen3-VL."""
292-
from modelopt.torch.export.plugins.mcore_qwen import (
293-
qwen3_causal_lm_import,
294-
)
285+
from modelopt.torch.export.plugins.mcore_qwen import qwen3_causal_lm_import
295286

296287
assert (
297288
qwen3vl_causal_lm_import["output_layer"].target_name_or_prefix

0 commit comments

Comments
 (0)