Skip to content

Commit 8414a7f

Browse files
committed
fix
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
1 parent 7994035 commit 8414a7f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/unit_tests/_transformers/test_auto_model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ def test_from_pretrained_liger_kernel_not_available(self, caplog):
4949
):
5050
cfg = Mock()
5151
cfg.architectures = ["HFArch"]
52-
mock_cfg_from_pretrained.return_value = cfg
52+
cfg.auto_map = []
53+
mock_cfg_from_pretrained.return_value = (cfg, {})
5354
mock_model = MagicMock()
5455
mock_model.config = {}
5556
mock_from_pretrained.return_value = mock_model
@@ -151,7 +152,7 @@ def test_from_pretrained_registry_downloads_checkpoint_files_rank0(self):
151152
patch("nemo_automodel._transformers.auto_model.dist.is_initialized", return_value=True),
152153
patch("nemo_automodel._transformers.auto_model.dist.get_world_size", return_value=1),
153154
patch("nemo_automodel._transformers.auto_model.dist.get_rank", return_value=0),
154-
patch("nemo_automodel._transformers.auto_model.dist.barrier") as mock_barrier,
155+
patch("nemo_automodel.components.distributed.utils.FirstRankPerNode") as mock_barrier,
155156
):
156157
# Prepare a fake config with architectures and commit hash
157158
cfg = Mock()

0 commit comments

Comments
 (0)