Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/5275 clean progress bar print #5470

Merged
Merged
Prev Previous commit
Next Next commit
printing alongside progress bar added to LightningModule.print()
  • Loading branch information
Alexander Snorkin authored and Alexander Snorkin committed Feb 17, 2021
commit 539e2e660db09987fcac8046f18389055ab3d671
6 changes: 5 additions & 1 deletion pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ def forward(self, x):

"""
if self.trainer.is_global_zero:
print(*args, **kwargs)
progress_bar = self.trainer.progress_bar_callback
if progress_bar is not None and progress_bar.is_enabled:
progress_bar.print(*args, **kwargs)
else:
print(*args, **kwargs)

def log(
self,
Expand Down