Skip to content

Commit 4cfaabc

Browse files
committed
test(speechlm2): use consistent SALM imports
Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
1 parent 41feb84 commit 4cfaabc

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎tests/collections/speechlm2/test_vllm_plugin.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ class TestMTPPlugin:
13121312
@pytest.fixture(autouse=True)
13131313
def restore_original_override(self):
13141314
"""Keep the process-local fallback hook isolated between tests."""
1315-
import nemo.collections.speechlm2.vllm.salm as salm_module
1315+
from nemo.collections.speechlm2.vllm import salm as salm_module
13161316

13171317
original_override = salm_module._ORIGINAL_VLLM_HF_CONFIG_OVERRIDE
13181318
yield
@@ -1420,7 +1420,7 @@ def test_patched_override_is_pickleable_for_spawned_engine(self, monkeypatch):
14201420
from transformers import AutoConfig
14211421
from vllm.config.speculative import SpeculativeConfig
14221422

1423-
import nemo.collections.speechlm2.vllm.salm as salm_module
1423+
from nemo.collections.speechlm2.vllm import salm as salm_module
14241424
from nemo.collections.speechlm2.vllm.salm import register
14251425

14261426
monkeypatch.setattr(
@@ -1456,7 +1456,7 @@ def test_patched_override_lazily_captures_native_hook_in_spawn_child(self, monke
14561456
"""A fresh spawn import should delegate unrelated configs to vLLM's native hook."""
14571457
from vllm.config.speculative import SpeculativeConfig
14581458

1459-
import nemo.collections.speechlm2.vllm.salm as salm_module
1459+
from nemo.collections.speechlm2.vllm import salm as salm_module
14601460

14611461
original_calls = []
14621462

@@ -1482,7 +1482,7 @@ def test_patched_override_rejects_missing_native_hook(self, monkeypatch):
14821482
"""A corrupted install must fail clearly instead of recursing into our override."""
14831483
from vllm.config.speculative import SpeculativeConfig
14841484

1485-
import nemo.collections.speechlm2.vllm.salm as salm_module
1485+
from nemo.collections.speechlm2.vllm import salm as salm_module
14861486

14871487
monkeypatch.setattr(salm_module, "_ORIGINAL_VLLM_HF_CONFIG_OVERRIDE", None)
14881488
monkeypatch.setattr(
@@ -1560,7 +1560,7 @@ def _recording_orig(cfg):
15601560
original_calls.append(cfg)
15611561
return cfg
15621562

1563-
import nemo.collections.speechlm2.vllm.salm as salm_module
1563+
from nemo.collections.speechlm2.vllm import salm as salm_module
15641564

15651565
monkeypatch.setattr(salm_module, "_ORIGINAL_VLLM_HF_CONFIG_OVERRIDE", None)
15661566
monkeypatch.setattr(SpeculativeConfig, "hf_config_override", staticmethod(_recording_orig))
@@ -1579,7 +1579,7 @@ def test_patched_override_depth_without_enabled_flag_falls_through(self, monkeyp
15791579
from transformers import AutoConfig
15801580
from vllm.config.speculative import SpeculativeConfig
15811581

1582-
import nemo.collections.speechlm2.vllm.salm as salm_module
1582+
from nemo.collections.speechlm2.vllm import salm as salm_module
15831583
from nemo.collections.speechlm2.vllm.salm import register
15841584

15851585
monkeypatch.setattr(
@@ -1611,7 +1611,7 @@ def test_patched_override_explicitly_disabled_mtp_falls_through(self, monkeypatc
16111611
from transformers import AutoConfig
16121612
from vllm.config.speculative import SpeculativeConfig
16131613

1614-
import nemo.collections.speechlm2.vllm.salm as salm_module
1614+
from nemo.collections.speechlm2.vllm import salm as salm_module
16151615
from nemo.collections.speechlm2.vllm.salm import register
16161616

16171617
monkeypatch.setattr(
@@ -1690,7 +1690,7 @@ def test_mtp_override_reregistration_preserves_first_native_hook(self, monkeypat
16901690
from transformers import AutoConfig
16911691
from vllm.config.speculative import SpeculativeConfig
16921692

1693-
import nemo.collections.speechlm2.vllm.salm as salm_module
1693+
from nemo.collections.speechlm2.vllm import salm as salm_module
16941694
from nemo.collections.speechlm2.vllm.salm import register
16951695

16961696
monkeypatch.setattr(

0 commit comments

Comments
 (0)