Skip to content

Commit

Permalink
Fix #48
Browse files Browse the repository at this point in the history
  • Loading branch information
erogol committed Jun 3, 2022
1 parent 23e3c77 commit 0b3c88a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,12 @@ def test_run(self) -> None:
else:
test_outputs = self.model.test(self.training_assets, self.test_loader, None)
if hasattr(self.model, "test_log") or (self.num_gpus > 1 and hasattr(self.model.module, "test_log")):
self.model.test_log(test_outputs, self.dashboard_logger, self.training_assets, self.total_steps_done)
if self.num_gpus > 1:
self.model.module.test_log(
test_outputs, self.dashboard_logger, self.training_assets, self.total_steps_done
)
else:
self.model.test_log(test_outputs, self.dashboard_logger, self.training_assets, self.total_steps_done)

def _restore_best_loss(self):
"""Restore the best loss from the args.best_path if provided else
Expand Down

0 comments on commit 0b3c88a

Please sign in to comment.