Skip to content

Commit 7649f69

Browse files
committed
add docstring
1 parent 275c9aa commit 7649f69

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/loggers/test_all.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
TestTubeLogger,
3232
WandbLogger,
3333
)
34-
from pytorch_lightning.loggers.base import DummyExperiment, LightningLoggerBase
34+
from pytorch_lightning.loggers.base import DummyExperiment
3535
from tests.helpers import BoringModel
3636
from tests.helpers.runif import RunIf
3737
from tests.loggers.test_comet import _patch_comet_atexit

tests/trainer/logging_/test_distributed_logging.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323

2424

2525
class AllRankLogger(LightningLoggerBase):
26+
"""
27+
Logger to test all-rank logging (i.e. not just rank 0).
28+
Logs are saved to local variable `logs`.
29+
"""
30+
2631
def __init__(self):
2732
super().__init__()
2833
self.logs = {}
@@ -32,9 +37,7 @@ def experiment(self) -> Any:
3237
return self.exp
3338

3439
def log_metrics(self, metrics: Dict[str, float], step: Optional[int] = None):
35-
print("appending", metrics, step)
3640
self.logs.update(metrics)
37-
print(self.logs)
3841

3942
def version(self) -> Union[int, str]:
4043
return 1

0 commit comments

Comments
 (0)