ertk.train.ModelConfig
- class ertk.train.ModelConfig(type: str = '???', config: ~typing.Any | None = None, args: ~typing.Dict[str, ~typing.Any] = <factory>, args_path: str | None = None, param_grid: ~typing.Dict[str, ~typing.Any] = <factory>, param_grid_path: str | None = None)
Bases:
ERTKConfigClass to hold model configuration.
- __init__(type: str = '???', config: ~typing.Any | None = None, args: ~typing.Dict[str, ~typing.Any] = <factory>, args_path: str | None = None, param_grid: ~typing.Dict[str, ~typing.Any] = <factory>, param_grid_path: str | None = None) None
Methods
__init__([type, config, args, args_path, ...])Inherited Methods
from_config(config)Create config object from any compatible config.
from_file(path[, override])Create config from YAML file and optionlly override some values.
merge_with_args([args])Merge config with command-line arguments.
to_dictconfig()Convert config to DictConfig.
to_file(path)Write config to YAML file.
to_string()Generate YAML string representation of config.
Attributes
Path to a YAML file containing model arguments.
Model configuration.
Path to a YAML file containing a parameter grid for hyperparameter search.
Model type.
Model arguments.
Parameter grid for hyperparameter search.
- args: Dict[str, Any]
Model arguments. These are passed to the model class constructor as keyword arguments.
- args_path: str | None = None
Path to a YAML file containing model arguments. These are passed to the model class constructor as keyword arguments.
- param_grid: Dict[str, Any]
Parameter grid for hyperparameter search. This is passed to scikit-learn’s
GridSearchCVclass.