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.UserConfig or a file in .py or .json format. Arguments passed to python when executing the script are parsed using argparse if config is left None. All keys in tabensemb.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_opt to turn on Bayesian hyperparameter optimization, --no-bayes_opt to 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.UserConfig instance. If it is None, arguments passed to python will be parsed. If it is a path, it will be passed to tabensemb.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}