nemo_curator.stages.audio.advanced_pipelines.audio_data_filter.config

View as Markdown

Configuration loader for the Audio Data Filter pipeline.

Loads pipeline parameters from a YAML config file organised by stage. Users edit the YAML to override defaults without touching code.

Module Contents

Functions

NameDescription
_deep_mergeRecursively merge overrides into base, returning a new dict.
_validateValidate cross-field constraints after merge.
get_enabled_stagesReturn a list of enabled stage names from a loaded config.
load_configLoad pipeline configuration from YAML.

Data

_DEFAULT_CONFIG_PATH

_MOS_MAX

API

nemo_curator.stages.audio.advanced_pipelines.audio_data_filter.config._deep_merge(
base: dict,
overrides: dict
) -> dict

Recursively merge overrides into base, returning a new dict.

nemo_curator.stages.audio.advanced_pipelines.audio_data_filter.config._validate(
cfg: dict[str, typing.Any]
) -> None

Validate cross-field constraints after merge.

nemo_curator.stages.audio.advanced_pipelines.audio_data_filter.config.get_enabled_stages(
cfg: dict[str, typing.Any]
) -> list[str]

Return a list of enabled stage names from a loaded config.

nemo_curator.stages.audio.advanced_pipelines.audio_data_filter.config.load_config(
config_path: str | pathlib.Path | None = None
) -> dict[str, typing.Any]

Load pipeline configuration from YAML.

Loads the shipped default config and deep-merges any user overrides on top. Only the values explicitly set in the user file override defaults; everything else keeps its default value.

Parameters:

config_path
str | Path | NoneDefaults to None

Path to a user YAML config file. When None, the built-in default_config.yaml is used as-is.

Returns: dict[str, Any]

A nested dict keyed by stage name with parameter values.

Raises:

  • FileNotFoundError: If config_path does not exist.
  • yaml.YAMLError: If either YAML file is malformed.
nemo_curator.stages.audio.advanced_pipelines.audio_data_filter.config._DEFAULT_CONFIG_PATH = Path(__file__).parent / 'default_config.yaml'
nemo_curator.stages.audio.advanced_pipelines.audio_data_filter.config._MOS_MAX = 5.0