workspace / tests /test_inference /test_inference.py
AntonioJun's picture
Replace tests with local workspace contents
e8055cf verified
Raw
History Blame Contribute Delete
791 Bytes
"""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")