From 8416f1b633696235d5f769b3ae0d14d676ef1239 Mon Sep 17 00:00:00 2001 From: tchaton Date: Fri, 26 Mar 2021 18:12:39 +0000 Subject: [PATCH] resolve flake8 --- .../connectors/logger_connector/epoch_result_store.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py b/pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py index 8b12b41d12355..e2ce66c86ecff 100644 --- a/pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py +++ b/pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py @@ -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: