def test_load_checkpoint_no_state(tmp_path):
    """Test that the ModelParallelStrategy strategy can't load the full state without access to a model instance from
    the user."""
    strategy = ModelParallelStrategy(parallelize_fn=(lambda m, _: m))
    with pytest.raises(ValueError, match=escape("Got ModelParallelStrategy.load_checkpoint(..., state=None")):
        strategy.load_checkpoint(path=tmp_path, state=None)
    with pytest.raises(ValueError, match=escape("Got ModelParallelStrategy.load_checkpoint(..., state={})")):
        strategy.load_checkpoint(path=tmp_path, state={})
Test that the ModelParallelStrategy strategy can't load the full state without access to a model instance from
    the user.
tests/tests_fabric/strategies/test_model_parallel.py