Skip to content

Commit

Permalink
resolve flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
tchaton committed Mar 26, 2021
1 parent 1eb08d3 commit 8416f1b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,12 @@ class EpochResultStore:

def __init__(self, trainer: 'pl.Trainer') -> None:
self.trainer = proxy(trainer)
self._should_warn = self.trainer.accelerator_connector.is_distributed and not self.trainer.training_type_plugin.rpc_enabled

# Add warning only for distributed (expect rpc as main worker is running the code).
_should_warn = trainer.accelerator_connector.is_distributed
_should_warn &= not trainer.training_type_plugin.rpc_enabled
self._should_warn = _should_warn

self.reset()

def __getitem__(self, key: str) -> Any:
Expand Down

0 comments on commit 8416f1b

Please sign in to comment.