Skip to content

Commit

Permalink
add comment mentioning use by Lite
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Oct 19, 2021
1 parent ce1bfde commit 6a13cf7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def _setup_models_and_optimizers(
) -> Tuple[List[Module], List[Optimizer]]:
"""Setup multiple models and multiple optimizers together.
Primarily used by Lightning Lite.
The returned objects are expected to be in the same order they were passed in.
The default implementation will call :meth:`_setup_model` and :meth:`_setup_optimizer` on the input lists.
"""
Expand All @@ -75,12 +77,12 @@ def _setup_models_and_optimizers(
return models, optimizers

def _setup_model(self, model: Module) -> Module:
"""Performs setup for the model, e.g., by wrapping it by another class."""
"""Performs setup for the model, e.g., by wrapping it by another class. Primarily used by Lightning Lite."""
# TODO (@awaelchli): standardize this across all plugins in Lightning and Lite. Related refactor: #7324
return model

def _setup_optimizer(self, optimizer: Optimizer) -> Optimizer:
"""Performs setup for the optimizer, e.g., by wrapping it by another class."""
"""Performs setup for the optimizer, e.g., by wrapping it by another class. Primarily used by Lightning Lite."""
# TODO (@awaelchli): standardize this across all plugins in Lightning and Lite. Related refactor: #7324
return optimizer

Expand Down

0 comments on commit 6a13cf7

Please sign in to comment.