A lightweight library for defining and managing system configurations for scientific experimentation.
Overall
score
97%
Evaluation — 97%
↑ 1.05xAgent success when using this tile
Create a configuration system with custom validation rules for a machine learning training pipeline. The system should validate configuration values automatically and provide helpful error messages when invalid values are detected.
Implement a custom configuration class that extends YACS's configuration functionality to add validation logic. The validator should enforce the following rules:
Your implementation should:
@generates
class ValidatedConfig:
"""
A configuration class that extends YACS CfgNode with custom validation.
Validates:
- LEARNING_RATE: Must be in range (0.0, 1.0]
- BATCH_SIZE: Must be a positive integer
- OPTIMIZER: Must be one of ["adam", "sgd", "rmsprop"]
"""
pass
def get_default_config():
"""
Returns a new ValidatedConfig instance with default training parameters.
Default values:
- LEARNING_RATE: 0.001
- BATCH_SIZE: 32
- OPTIMIZER: "adam"
Returns:
ValidatedConfig: A configuration instance with defaults
"""
passProvides the base configuration system with CfgNode class.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-yacsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10