Skip to content

Commit

Permalink
Added NeptuneLogger to test_logger_created_on_rank_zero_only
Browse files Browse the repository at this point in the history
  • Loading branch information
Raalsky committed Dec 14, 2021
1 parent c5d1edf commit a63bb3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/loggers/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a63bb3c

Please sign in to comment.