parameter_paths
parameter_paths
¶
Private schema-aware parameter path primitives.
Classes:
| Name | Description |
|---|---|
ParameterPath |
Canonical path to a parameter field. |
ParameterFieldKind |
Schema classification for a parameter field. |
ParameterField |
One indexed field in a parameter schema. |
ParameterAlias |
One accepted compatibility name and its canonical parameter path. |
ResolvedParameterName |
A parameter name resolved to one canonical path. |
UnknownParameterName |
A parameter name not present in the schema. |
AmbiguousParameterName |
A bare parameter name with multiple canonical candidates. |
ParameterSchema |
Indexed field paths for one |
Functions:
| Name | Description |
|---|---|
format_parameter_path |
Join path segments into the canonical dotted string. |
classify_parameter_annotation |
Classify a Pydantic field annotation as a branch or leaf. |
split_parameter_path |
Split a parameter name into a canonical path. |
insert_parameter_value |
Insert a value at an already resolved path. |
ParameterPath(parts)
dataclass
¶
Canonical path to a parameter field.
ParameterFieldKind
¶
Bases: Enum
Schema classification for a parameter field.
ParameterField(path, kind)
dataclass
¶
One indexed field in a parameter schema.
ParameterAlias(name, path)
dataclass
¶
One accepted compatibility name and its canonical parameter path.
ResolvedParameterName(path)
dataclass
¶
A parameter name resolved to one canonical path.
UnknownParameterName(name)
dataclass
¶
A parameter name not present in the schema.
AmbiguousParameterName(name, candidates)
dataclass
¶
A bare parameter name with multiple canonical candidates.
ParameterSchema(model_type, fields, aliases)
dataclass
¶
Indexed field paths for one Parameters model type.
Methods:
| Name | Description |
|---|---|
from_model |
Build a schema from Pydantic field annotations. |
resolve |
Resolve a canonical dotted or bare parameter name. |
require |
Resolve one name or raise a user-facing configuration error. |
normalize_aliases |
Translate declared aliases to canonical paths, with aliases taking precedence. |
from_model(model_type)
classmethod
¶
Build a schema from Pydantic field annotations.
Source code in src/nemo_safe_synthesizer/configurator/parameter_paths.py
resolve(name, *, infer_bare_name=True)
¶
Resolve a canonical dotted or bare parameter name.
Source code in src/nemo_safe_synthesizer/configurator/parameter_paths.py
require(name, *, infer_bare_name=True)
¶
Resolve one name or raise a user-facing configuration error.
Source code in src/nemo_safe_synthesizer/configurator/parameter_paths.py
normalize_aliases(source)
¶
Translate declared aliases to canonical paths, with aliases taking precedence.
Source code in src/nemo_safe_synthesizer/configurator/parameter_paths.py
format_parameter_path(parts)
¶
classify_parameter_annotation(annotation)
¶
Classify a Pydantic field annotation as a branch or leaf.
Source code in src/nemo_safe_synthesizer/configurator/parameter_paths.py
split_parameter_path(name, separator=PARAMETER_PATH_SEPARATOR)
¶
Split a parameter name into a canonical path.
Source code in src/nemo_safe_synthesizer/configurator/parameter_paths.py
insert_parameter_value(target, path, value)
¶
Insert a value at an already resolved path.