espnet3.systems.base.measure.measure
Less than 1 minute
espnet3.systems.base.measure.measure
espnet3.systems.base.measure.measure(config: DictConfig)
Compute metrics for each test set and write a measures JSON file.
- Parameters:config – Hydra/omegaconf configuration with inference and metric settings.
- Returns: Nested dict keyed by metric class path and test set name.
- Raises:
- AssertionError – If
config.metricsis missing. - TypeError – If an instantiated metric is not an
AbsMetrics. - ValueError – If inputs cannot be inferred for a metric.
- AssertionError – If
Example
>>> from omegaconf import OmegaConf
>>> cfg = OmegaConf.load("conf/measure.yaml")
>>> results = measure(cfg) # writes cfg.infer_dir/measures.json