Skip to content

Commit

Permalink
fix: report manager
Browse files Browse the repository at this point in the history
  • Loading branch information
helderlopes97 committed Feb 9, 2024
1 parent e93c97a commit 45cc2b4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions onmt/utils/report_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ def report_training(
(set 'start_time' or use 'start()'"""
)

# For wandb use step (1000, 2000, .. ) instead of progress_step
# (1,2,3, ...) for training, as otherwise it raises an error
# after logging the validation stats with the progress_step
# because of the too "old" logs.
if isinstance(self.tensorboard_writer, WandbSummaryWriter):
self.maybe_log_tensorboard(report_stats, "progress", learning_rate, step)
else: # default onmt behaviour
self.maybe_log_tensorboard(
report_stats, "progress", learning_rate, self.progress_step
)
# # For wandb use step (1000, 2000, .. ) instead of progress_step
# # (1,2,3, ...) for training, as otherwise it raises an error
# # after logging the validation stats with the progress_step
# # because of the too "old" logs.
# if isinstance(self.tensorboard_writer, WandbSummaryWriter):
# self.maybe_log_tensorboard(report_stats, "progress", learning_rate, step)
# else: # default onmt behaviour
# self.maybe_log_tensorboard(
# report_stats, "progress", learning_rate, self.progress_step
# )

if step % self.report_every == 0:
if multigpu:
Expand Down

0 comments on commit 45cc2b4

Please sign in to comment.