Skip to content

Commit 119002a

Browse files
committed
add silent option in core.Meter.log()
1 parent 1cfb186 commit 119002a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

torchdrug/core/meter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def log(self, record, category="train/batch"):
3939
category (str, optional): log category.
4040
Available types are ``train/batch``, ``train/epoch``, ``valid/epoch`` and ``test/epoch``.
4141
"""
42+
if self.silent:
43+
return
44+
4245
if category.endswith("batch"):
4346
step_id = self.batch_id
4447
elif category.endswith("epoch"):

0 commit comments

Comments
 (0)