config
Configuration loaders for generator scenarios.
- pysatl_cpd.data.generator.config.scenario_from_yaml(path)[source]
Load one scenario specification from a YAML file.
- Parameters:
- Returns:
Parsed scenario specification.
- Return type:
- Raises:
ValueError – If the YAML content is not a mapping.
- pysatl_cpd.data.generator.config.scenarios_from_yaml(path)[source]
Load one or more scenario specifications from a YAML file.
If the YAML contains a top-level
scenarioskey, each entry under it is parsed as a named scenario. Otherwise the entire file is treated as a single scenario and returned under itsnamekey.- Parameters:
- Returns:
Dictionary mapping scenario names to parsed specifications.
- Return type:
- Raises:
ValueError – If the YAML structure is invalid.
- pysatl_cpd.data.generator.config.scenario_from_mapping(mapping)[source]
Build a scenario specification from a plain mapping.
- pysatl_cpd.data.generator.config.parse_distribution_spec(mapping)[source]
Build a distribution specification from a plain mapping.
- Parameters:
mapping (
Mapping[str,Any]) – Dictionary containing akindkey and distribution-specific parameters.- Returns:
Parsed distribution specification.
- Return type:
MultivariateNormalSpec|IndependentColumnsSpec|NormalSpec|UniformSpec|ExponentialSpec|StudentTSpec- Raises:
ValueError – If
kindis not one of the supported distribution types.