espnet3.systems.base.system.BaseSystem
espnet3.systems.base.system.BaseSystem
class espnet3.systems.base.system.BaseSystem(train_config: DictConfig | None = None, infer_config: DictConfig | None = None, measure_config: DictConfig | None = None, stage_log_mapping: dict | None = None)
Bases: object
Base class for all ESPnet3 systems.
Each system should implement the following: : - create_dataset()
- train()
- infer()
- measure()
- publish()
This class intentionally does NOT implement: : - DAG
- dependency checks
- caching
All behavior is config-driven.
- Parameters:
- train_config (DictConfig | None) – Training configuration.
- infer_config (DictConfig | None) – Inference configuration.
- measure_config (DictConfig | None) – Measurement configuration.
- stage_log_mapping (dict | None) – Optional overrides for stage log path resolution. Keys are stage names; values are dotted attribute paths (e.g.,
"train_config.exp_dir") or lists/tuples of such paths (first non-empty value wins).
Stage log mapping (base defaults): : Stage | Path reference | <br/> <br/>
|<br/> —
<br/>
|<br/> — | | create_dataset | train_config.recipe_dir | | collect_stats | train_config.stats_dir | | train | train_config.exp_dir | | infer | infer_config.inference_dir | | measure | measure_config.inference_dir | | pack_model | train_config.exp_dir | | upload_model | train_config.exp_dir |
Any stage missing from the mapping (or resolving to None) falls back to the default log directory: train_config.exp_dir when available, otherwise <cwd>/logs.
Examples
Override a subset of stage log paths: : ``` ``
<br/>`
<br/>
python
system = BaseSystem(
<br/>
> train_config=train_cfg,
> infer_config=infer_cfg,
> measure_config=measure_cfg,
> stage_log_mapping={
<br/>
> > “infer”: “train_config.exp_dir”,
> > “measure”: “train_config.exp_dir”,
<br/>
> },
Initialize the system with optional stage configs.
<div class='custom-h4'><p>collect_stats<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Collect statistics needed for training.
<div class='custom-h4'><p>create_dataset<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Create datasets using the configured stage.
<div class='custom-h4'><p>infer<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Run inference on the configured datasets.
<div class='custom-h4'><p>measure<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Compute evaluation metrics from hypothesis/reference outputs.
<div class='custom-h4'><p>pack_demo<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Pack demo artifacts into a runnable demo bundle.
<div class='custom-h4'><p>pack_model<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Pack model artifacts into an espnet3 bundle.
<div class='custom-h4'><p>publish<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Publish artifacts from the experiment.
<div class='custom-h4'><p>train<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Train the system model.
<div class='custom-h4'><p>upload_demo<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Upload demo bundle to HuggingFace Spaces (stub).
<div class='custom-h4'><p>upload_model<span class='small-bracket'>(*args, **kwargs)</span></p></div>
Upload model bundle to HuggingFace.