def test_load_unknown_checkpoint_type(_, tmp_path):
    """Test that the strategy validates the contents at the checkpoint path."""
    strategy = ModelParallelStrategy()
    strategy.model = Mock()
    strategy._lightning_module = Mock(strict_loading=True)
    path = tmp_path / "empty_dir"  # neither a single file nor a directory with meta file
    path.mkdir()
    with pytest.raises(ValueError, match="does not point to a valid checkpoint"):
        strategy.load_checkpoint(checkpoint_path=path)
Test that the strategy validates the contents at the checkpoint path.
tests/tests_pytorch/strategies/test_model_parallel.py