espnet3.demo.runtime.build_runtime
Less than 1 minute
espnet3.demo.runtime.build_runtime
espnet3.demo.runtime.build_runtime(demo_cfg, demo_dir: Path) → DemoRuntime
Build demo runtime (model + runner wiring) from the demo config.
This resolves the inference provider/runner classes and builds the model via InferenceProvider.build_model(infer_cfg).
- Parameters:
- demo_cfg – Loaded demo configuration (typically from
demo.yaml). - demo_dir (Path) – Demo directory used to resolve relative paths.
- demo_cfg – Loaded demo configuration (typically from
- Returns: Runtime container holding the resolved model, runner class, : output mapping, and extra kwargs.
- Return type:DemoRuntime
- Raises:RuntimeError – If inference provider is not configured or infer_config is missing.
Example
>>> runtime = build_runtime(demo_cfg, Path("exp/demo"))
>>> runtime.model is not None
True