espnet3.systems.base.metric.measure
Less than 1 minute
espnet3.systems.base.metric.measure
espnet3.systems.base.metric.measure(metrics_config: DictConfig)
Compute metrics for each test set and write a metrics JSON file.
Test sets are resolved in the following order:
- If
metrics_config.dataset.testis defined, use the configurednamefields as-is.- Otherwise, scan
metrics_config.inference_dirand treat each non-hidden subdirectory as a test set.
Example
If inference_dir contains:
exp/my_run/inference/
test-clean/
test-other/then measure() scores both test-clean and test-other when metrics_config.dataset.test is omitted.
- Parameters:metrics_config – Omegaconf configuration with inference and metric settings.
- Returns: Nested dict keyed by metric class path and test set name.
- Raises:ValueError – If no test sets can be resolved from either
metrics_config.dataset.testormetrics_config.inference_dir.
