Config Loader¤
artifex.configs exposes a small set of typed loader helpers for the retained
runtime config assets under src/artifex/configs/.
Public Imports¤
from artifex.configs import (
get_config_path,
get_data_config,
get_inference_config,
get_protein_extensions_config,
get_training_config,
load_experiment_config,
)
Current Contract¤
get_config_path(name, config_type=...)resolves the retained config asset pathget_data_config(name)returns a typedDataConfigget_training_config(name)returns a typedTrainingConfigget_inference_config(name)returns the narrowest typed inference config that matches the YAML shapeget_protein_extensions_config(name="protein")returns a typedProteinExtensionsConfigload_experiment_config(name)returns a typedExperimentTemplateConfig- concrete frozen dataclass configs can also load themselves directly with
TrainingConfig.from_yaml(...)and the correspondingfrom_yaml()method on other config classes
Example¤
from artifex.configs import (
ExperimentTemplateConfig,
TrainingConfig,
get_inference_config,
get_protein_extensions_config,
get_training_config,
load_experiment_config,
)
training_config = get_training_config("protein_diffusion_training")
training_config_from_yaml = TrainingConfig.from_yaml(
"src/artifex/configs/defaults/training/protein_diffusion_training.yaml"
)
inference_config = get_inference_config("protein_diffusion_inference")
protein_extensions = get_protein_extensions_config("protein")
experiment_template = load_experiment_config("protein_diffusion_experiment")
The loader rejects empty YAML files and non-mapping top-level YAML payloads.
Retained shipped experiment templates resolve to ExperimentTemplateConfig
objects and use explicit placeholder roots such as {ARTIFEX_OUTPUT_ROOT},
{ARTIFEX_DATA_ROOT}, and {ARTIFEX_CACHE_ROOT} for machine-specific paths.
Typed loader helpers raise the repo-owned ConfigError hierarchy for missing
files, parse failures, and typed schema validation failures.