File size: 791 Bytes
e8055cf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """Tests for inference/__init__.py and run.py -- model registry and cache path layout."""
from inference import adapters
from inference import run
def test_model_registry_uses_explicit_names():
assert adapters.available_models() == (
"DA3-LARGE-1.1",
"DA3NESTED-GIANT-LARGE-1.1",
"SAM3",
)
def test_output_paths_include_frame_hierarchy(tmp_path, monkeypatch):
monkeypatch.setattr(run.inference_config, "CACHE_ROOT", tmp_path)
assert run.output_path(
"scene1", "SAM3", "uniform", "tracking", frame_count=64
).endswith("sam3/tracking/frames/uniform/64/scene1.pt")
assert run.output_path(
"scene1", "DA3NESTED-GIANT-LARGE-1.1", "uniform", frame_count=64
).endswith("depth-anything-3/metric/frames/uniform/64/scene1.pkl")
|