model_schema ¶
Module for validating YAML configuration files.
Classes:
-
Loss–Loss parameters.
-
Model–Model configuration.
-
Objective–Objective parameters.
-
Pruner–Pruner parameters.
-
Sampler–Sampler parameters.
-
TunableParameter–Tunable parameter.
-
VariableList–Variable list.
Loss ¶
Bases: BaseModel
Loss parameters.
Model ¶
Bases: BaseModel
Model configuration.
Methods:
-
validate_data_params–Validate that data_params contains batch_size.
-
validate_device–Validate that device is a valid PyTorch device if specified.
-
validate_input–Print input data for debugging.
validate_data_params ¶
validate_data_params() -> Model
Validate that data_params contains batch_size.
Source code in src/stimulus/learner/interface/model_schema.py
183 184 185 186 187 188 | |
validate_device ¶
validate_device() -> Model
Validate that device is a valid PyTorch device if specified.
Source code in src/stimulus/learner/interface/model_schema.py
190 191 192 193 194 195 196 197 198 | |
validate_input classmethod ¶
Print input data for debugging.
Source code in src/stimulus/learner/interface/model_schema.py
176 177 178 179 180 181 | |
Objective ¶
Bases: BaseModel
Objective parameters.
Methods:
-
validate_direction–Validate that direction is supported by Optuna.
validate_direction ¶
validate_direction() -> Objective
Validate that direction is supported by Optuna.
Source code in src/stimulus/learner/interface/model_schema.py
115 116 117 118 119 120 121 122 | |
Pruner ¶
Bases: BaseModel
Pruner parameters.
Methods:
-
validate_pruner–Validate that pruner is supported by Optuna.
validate_pruner ¶
validate_pruner() -> Pruner
Validate that pruner is supported by Optuna.
Source code in src/stimulus/learner/interface/model_schema.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
Sampler ¶
Bases: BaseModel
Sampler parameters.
Methods:
-
validate_sampler–Validate that sampler is supported by Optuna.
validate_sampler ¶
validate_sampler() -> Sampler
Validate that sampler is supported by Optuna.
Source code in src/stimulus/learner/interface/model_schema.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
TunableParameter ¶
Bases: BaseModel
Tunable parameter.
Methods:
-
validate_mode–Validate that mode is supported by Optuna or custom methods.
-
validate_params–Validate that the params are supported by Optuna.
validate_mode ¶
validate_mode() -> TunableParameter
Validate that mode is supported by Optuna or custom methods.
Source code in src/stimulus/learner/interface/model_schema.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
validate_params ¶
validate_params() -> TunableParameter
Validate that the params are supported by Optuna.
Source code in src/stimulus/learner/interface/model_schema.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
VariableList ¶
Bases: BaseModel
Variable list.
Methods:
-
validate_length–Validate that length is supported by Optuna.
validate_length ¶
validate_length() -> VariableList
Validate that length is supported by Optuna.
Source code in src/stimulus/learner/interface/model_schema.py
71 72 73 74 75 76 77 | |