Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and carmocca committed Jul 13, 2022
1 parent 89b0155 commit 24eadb5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/pytorch_lightning/loops/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,7 @@ def _load_from_state_dict(self, state_dict: Dict, prefix: str, metrics: Optional

if isinstance(v, BaseProgress):
v.load_state_dict(state_dict[key])
elif (
isinstance(v, _ResultCollection)
and trainer is not None
and trainer.lightning_module is not None
):
elif isinstance(v, _ResultCollection) and trainer is not None and trainer.lightning_module is not None:
metric_attributes = {
name: module
for name, module in self.trainer.lightning_module.named_modules()
Expand Down

0 comments on commit 24eadb5

Please sign in to comment.