From a63bb3c009b2d09a24495b3639ef178bacf8acd6 Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Tue, 14 Dec 2021 15:08:39 +0100 Subject: [PATCH] Added NeptuneLogger to test_logger_created_on_rank_zero_only --- tests/loggers/test_all.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/loggers/test_all.py b/tests/loggers/test_all.py index 6b3c547ed3ee5b..2dc0186ea302cc 100644 --- a/tests/loggers/test_all.py +++ b/tests/loggers/test_all.py @@ -47,6 +47,8 @@ def _get_logger_args(logger_class, save_dir): logger_args.update(offline_mode=True) if "offline" in inspect.getfullargspec(logger_class).args: logger_args.update(offline=True) + if issubclass(logger_class, NeptuneLogger): + logger_args.update(mode="offline") return logger_args @@ -330,7 +332,9 @@ def on_train_batch_start(self, trainer, pl_module, batch, batch_idx): @RunIf(skip_windows=True, skip_49370=True, skip_hanging_spawn=True) -@pytest.mark.parametrize("logger_class", [CometLogger, CSVLogger, MLFlowLogger, TensorBoardLogger, TestTubeLogger]) +@pytest.mark.parametrize( + "logger_class", [CometLogger, CSVLogger, MLFlowLogger, NeptuneLogger, TensorBoardLogger, TestTubeLogger] +) def test_logger_created_on_rank_zero_only(tmpdir, monkeypatch, logger_class): """Test that loggers get replaced by dummy loggers on global rank > 0.""" _patch_comet_atexit(monkeypatch)