Skip to content

Commit 2f8402f

Browse files
committed
delete obsolete test
1 parent 9243486 commit 2f8402f

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

tests/tests_pytorch/strategies/test_model_parallel.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -174,27 +174,6 @@ def test_save_checkpoint_path_exists(shutil_mock, torch_save_mock, tmp_path):
174174
assert path.is_dir()
175175

176176

177-
@RunIf(min_torch="2.3")
178-
@mock.patch("lightning.fabric.strategies.model_parallel._TORCH_GREATER_EQUAL_2_4", False)
179-
def test_load_full_checkpoint_support(tmp_path):
180-
"""Test that loading non-distributed checkpoints into distributed models requires PyTorch >= 2.4."""
181-
strategy = ModelParallelStrategy()
182-
strategy.model = Mock()
183-
strategy._lightning_module = Mock(strict_loading=True)
184-
path = tmp_path / "full.ckpt"
185-
path.touch()
186-
187-
with pytest.raises(ImportError, match="Loading .* into a distributed model requires PyTorch >= 2.4"), mock.patch(
188-
"lightning.fabric.strategies.model_parallel._has_dtensor_modules", return_value=True
189-
):
190-
strategy.load_checkpoint(checkpoint_path=path)
191-
192-
with pytest.raises(ImportError, match="Loading .* into a distributed model requires PyTorch >= 2.4"), mock.patch(
193-
"lightning.fabric.strategies.model_parallel._has_dtensor_modules", return_value=True
194-
):
195-
strategy.load_checkpoint(checkpoint_path=path)
196-
197-
198177
@RunIf(min_torch="2.3")
199178
@mock.patch("lightning.fabric.strategies.model_parallel._has_dtensor_modules", return_value=True)
200179
def test_load_unknown_checkpoint_type(_, tmp_path):

0 commit comments

Comments
 (0)