Skip to content

Commit 0ec4be4

Browse files
Alexander SnorkinBorda
authored andcommitted
printing alongside progress bar added to LightningModule.print()
1 parent 3a3f872 commit 0ec4be4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pytorch_lightning/core/lightning.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,11 @@ def forward(self, x):
179179
180180
"""
181181
if self.trainer.is_global_zero:
182-
print(*args, **kwargs)
182+
progress_bar = self.trainer.progress_bar_callback
183+
if progress_bar is not None and progress_bar.is_enabled:
184+
progress_bar.print(*args, **kwargs)
185+
else:
186+
print(*args, **kwargs)
183187

184188
def log(
185189
self,

0 commit comments

Comments
 (0)