Skip to content

Commit

Permalink
instantiate_only
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jul 6, 2021
1 parent b1a6e89 commit 14b5a6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytorch_lightning/utilities/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def __init__(
parser_kwargs: Dict[str, Any] = None,
subclass_mode_model: bool = False,
subclass_mode_data: bool = False,
skip_fit: bool = False,
instantiate_only: bool = False,
) -> None:
"""
Receives as input pytorch-lightning classes, which are instantiated
Expand Down Expand Up @@ -238,7 +238,7 @@ def __init__(
subclass_mode_data: Whether datamodule can be any `subclass
<https://jsonargparse.readthedocs.io/en/stable/#class-type-and-sub-classes>`_
of the given class.
skip_fit: If ``True``, the CLI won't automatically call ``Trainer.fit(...)``.
instantiate_only: If ``True``, the CLI won't automatically call ``Trainer.fit(...)``.
"""
assert issubclass(trainer_class, Trainer)
assert issubclass(model_class, LightningModule)
Expand Down Expand Up @@ -269,7 +269,7 @@ def __init__(
self.add_configure_optimizers_method_to_model()
self.prepare_fit_kwargs()

if skip_fit:
if instantiate_only:
return
self.before_fit()
self.fit()
Expand Down

0 comments on commit 14b5a6c

Please sign in to comment.