We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0afd4e1 commit 75d7357Copy full SHA for 75d7357
src/lightning/pytorch/cli.py
@@ -390,6 +390,7 @@ def __init__(
390
self._add_instantiators()
391
self.before_instantiate_classes()
392
self.instantiate_classes()
393
+ self.after_instantiate_classes()
394
395
if self.subcommand is not None:
396
self._run_subcommand(self.subcommand)
@@ -561,6 +562,9 @@ def instantiate_classes(self) -> None:
561
562
self._add_configure_optimizers_method_to_model(self.subcommand)
563
self.trainer = self.instantiate_trainer()
564
565
+ def after_instantiate_classes(self) -> None:
566
+ """Implement to run some code after instantiating the classes."""
567
+
568
def instantiate_trainer(self, **kwargs: Any) -> Trainer:
569
"""Instantiates the trainer.
570
0 commit comments