tabensemb.trainer.Trainer.load_config#
method
- Trainer.load_config(config: str | UserConfig | None = None, manual_config: Dict | None = None, project_root_subfolder: str | None = None) None[source]#
Load the configuration using a
tabensemb.config.UserConfigor a file in .py or .json format. Arguments passed to python when executing the script are parsed usingargparseifconfigis left None. All keys intabensemb.config.UserConfig.defaults()can be parsed, for example: For the loss function:--loss mse, For the total epoch:--epoch 200, For the option of bayes opt:--bayes_optto turn on Bayesian hyperparameter optimization,--no-bayes_optto turn it off. The loaded configuration will be saved as a .py file in the project folder.- Parameters:
- config
It can be the path to the configuration file in json or python format, or a
tabensemb.config.UserConfiginstance. If it is None, arguments passed to python will be parsed. If it is a path, it will be passed totabensemb.config.UserConfig.from_file().- manual_config
Update the configuration with a dict. For example:
manual_config={"bayes_opt": True}.- project_root_subfolder
The subfolder that the project will be locate in. The folder name will be
tabensemb.setting["default_output_path"]/{project}/{project_root_subfolder}/{TIME}-{config}