Model configurations define the full specification required to run a machine - - - learning workflow, including:
- model specifications
- feature set selection
- hyperparameter search settings
- training parameters
- hardware execution settings
- lineage metadata
Configurations are validated using Pydantic schemas to ensure correctness and reproducibility.
Two configuration types exist:
| Type | Purpose |
|---|---|
| Search | Defines hyperparameter search experiments |
| Train | Defines deterministic model training runs |
Both configurations share the same model specification base but diverge in their execution settings.
A model configuration goes through the following steps:
- Load YAML configuration
- Resolve inheritance (extends)
- Apply environment overlays
- Merge best parameters (training only)
- Validate configuration schema
- Compute configuration hash
This ensures that all runs are:
- reproducible
- validated
- traceable
Both search and training configs inherit from a shared specification model.
Both follow the same nesting logic as model specs (model specifications).
Example:
configs/search/cancellation/global/v1.yaml
configs/train/cancellation/global/v1.yaml
Core fields typically include:
| Field | Description |
|---|---|
name |
Model identifier |
version |
Version tag |
algorithm |
Model algorithm (e.g., CatBoost) |
task |
Task type (classification or regression) |
feature_set |
Feature set used for training |
These fields define the logical model definition independent of execution stage.
Search configurations define hyperparameter exploration experiments.
Schema: SearchModelConfig
Example:
name: credit_default_model
version: v1
algorithm: catboost
task:
type: classification
feature_set: credit_features_v2
extends:
- shared_defaults
seed: 42
cv: 5
verbose: 100
search:
random_state: 42
broad:
iterations: 200
n_iter: 50
param_distributions:
model:
depth: [4,6,8]
learning_rate: [0.01,0.03,0.1]
narrow:
enabled: true
iterations: 100
n_iter: 20
search_lineage:
created_by: sebastijan
created_at: 2026-02-27T23:53:30ZKey fields:
| Field | Description |
|---|---|
search |
Hyperparameter search configuration |
seed |
Random seed for reproducibility |
cv |
Cross-validation folds |
verbose |
Logging verbosity |
search_lineage |
Creation metadata |
Training configurations define deterministic model training runs using fixed hyperparameters.
Schema: TrainModelConfig
Example:
name: credit_default_model
version: v1
algorithm: catboost
task:
type: classification
feature_set: credit_features_v2
extends:
- shared_defaults
seed: 42
cv: 5
training:
iterations: 2000
model:
depth: 6
learning_rate: 0.03
ensemble:
bagging_temperature: 1.0
early_stopping_rounds: 50
training_lineage:
created_by: sebastijan
created_at: 2026-03-01T11:12:30ZKey fields:
| Field | Description |
|---|---|
training |
Training hyperparameters |
seed |
Random seed |
cv |
Cross-validation folds |
training_lineage |
Creation metadata |
Training configs often inherit hyperparameters discovered during search.
Search configurations support two-stage optimization:
Explores a wide hyperparameter space.
Example parameters:
depthlearning_ratel2_leaf_regmin_data_in_leaf
These are defined as candidate distributions.
Optional refinement around the best parameters discovered during the broad stage.
Parameters are defined using:
- offsets for integer parameters
- multiplicative factors for float parameters
- optional bounds
This allows automatic local hyperparameter refinement.
Both search and training workflows support configurable hardware execution.
Schema: HardwareConfig
Example:
hardware:
task_type: GPU
devices: [0]Supported backends:
| Task Type | Description |
|---|---|
CPU |
CPU execution |
GPU |
GPU execution |
Optional settings:
memory_limit_gballow_growth- device selection
Configs can be composed using inheritance and overlays.
The extends field allows a configuration to inherit from one or more base configs.
extends:
- shared_defaults
- catboost_defaultsLater configs override earlier ones.
Environment-specific values can be applied during loading.
Example environments:
configs/env/dev.yaml
configs/env/test.yaml
configs/env/prod.yaml
These overlays modify configuration values without changing the base config.
In the source code, "default" is equivalent to none.
During training, the system can automatically inject best parameters from a search run.
Source:
search_run/metadata.json
These parameters are merged into the training configuration before validation.
After validation, a SHA-256 hash is computed for the configuration.
The hash:
- excludes _meta runtime metadata
- is computed from the normalized configuration payload
- uniquely identifies the model definition
Example metadata entry:
_meta:
config_hash: 4c3f0d6a...
This enables:
- experiment reproducibility
- model lineage tracking
- configuration auditing
All model configurations are validated using strict Pydantic schemas.
Validation guarantees:
- unknown fields are rejected
- types are enforced
- required fields are present
- default values are applied
Invalid configurations raise a ConfigError during loading.