File size: 555 Bytes
0161e74 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | """Ensure the public checkpoint loader can be imported from multiple entry-points."""
import importlib
import pytest
pytest.importorskip("torch", reason="torch is required for checkpoint loading")
def test_model_loading_importable_from_package() -> None:
module = importlib.import_module("stack.model")
assert hasattr(module, "load_model_from_checkpoint")
def test_model_loading_importable_from_public_module() -> None:
module = importlib.import_module("stack.model_loading")
assert hasattr(module, "load_model_from_checkpoint")
|