lightning_template.utils#
Submodules#
Classes#
Implementation of a configurable command line tool for pytorch-lightning. |
|
Package Contents#
- class lightning_template.utils.LightningCLI(save_config_callback: Type[lightning.pytorch.cli.SaveConfigCallback] | None = SaveAndLogConfigCallback, trainer_class: Type[lightning_template.utils.cli.trainer._Trainer] | Callable[Ellipsis, lightning_template.utils.cli.trainer._Trainer] = Trainer, *args, **kwargs)#
Bases:
lightning.pytorch.cli.LightningCLIImplementation of a configurable command line tool for pytorch-lightning.
- _setup_parser_kwargs(*args, **kwargs) Tuple[Dict[str, Any], Dict[str, Any]]#
- add_default_arguments_to_parser(parser: lightning.pytorch.cli.LightningArgumentParser) None#
Adds default arguments to the parser.
- static randomly_select_seed() int#
- _set_seed() None#
Sets the seed.
- before_instantiate_classes() None#
Implement to run some code before instantiating the classes.
- _add_configure_optimizers_method_to_model(*args, **kwargs) None#
Overrides the model’s
configure_optimizers()method if a single optimizer and optionally a scheduler argument groups are added to the parser as ‘AUTOMATIC’.