AS2 / src /softasp /inference.py
wabdalm's picture
Release AS2 framework with Hydra-selected instantiations
69928d6 verified
Raw History Blame Contribute Delete
442 Bytes
"""Configuration-driven AS2 inference API."""
from omegaconf import DictConfig
from softasp.instantiations.runtime import predict, provider
def load_model(cfg: DictConfig):
"""Load a checkpoint according to the selected model provider."""
return provider(cfg, "model").load(cfg)
def predict_file(cfg: DictConfig) -> dict:
"""Read and predict according to the explicit instantiation configuration."""
return predict(cfg)