Skip to content

Commit

Permalink
Fix progress bar updates for Pod Training
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikb11 committed Jul 2, 2021
1 parent 98203e1 commit 6fda7d9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pytorch_lightning/plugins/training_type/tpu_spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,21 @@ def test_step(self, *args, **kwargs):
def predict_step(self, *args, **kwargs):
return self.model(*args, **kwargs)

def training_step_end(self, output):
if self.tpu_global_core_rank == 0 and int(os.getenv(xenv.TPUVM_MODE, 0)) == 1:
print(' ', end='', flush=True)
return output

def validation_step_end(self, output):
if self.tpu_global_core_rank == 0 and int(os.getenv(xenv.TPUVM_MODE, 0)) == 1:
print(' ', end='', flush=True)
return output

def test_step_end(self, output):
if self.tpu_global_core_rank == 0 and int(os.getenv(xenv.TPUVM_MODE, 0)) == 1:
print(' ', end='', flush=True)
return output

def save_checkpoint(self, checkpoint: Dict[str, Any], filepath: str) -> None:
"""Save model/training states as a checkpoint file through state-dump and file-write.
Expand Down

0 comments on commit 6fda7d9

Please sign in to comment.