SaveConfigCallback¶
- class lightning.pytorch.cli.SaveConfigCallback(parser, config, config_filename='config.yaml', overwrite=False, multifile=False)[소스]¶
기반 클래스:
lightning.pytorch.callbacks.callback.Callback
Saves a LightningCLI config to the log_dir when training starts.
- 매개변수
parser¶ (
LightningArgumentParser
) – The parser object used to parse the configuration.config¶ (
object
) – The parsed configuration that will be saved.overwrite¶ (
bool
) – Whether to overwrite an existing config file.multifile¶ (
bool
) – When input is multiple config files, saved config preserves this structure.
- 예외 발생
RuntimeError – If the config file already exists in the directory to avoid overwriting a previous run