Skip to content

Commit

Permalink
Fixes the iteration count used for logging to tensorboard (FAIR-Chem#128
Browse files Browse the repository at this point in the history
)

* Fixes the step number used for logging to tensorboard

* Trying to get the build to pass
  • Loading branch information
abhshkdz committed Oct 16, 2020
1 parent 4f9bf79 commit 105175e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ocpmodels/trainers/forces_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,10 @@ def train(self):
# Evaluate on val set every `eval_every` iterations.
if eval_every != -1 and iters % eval_every == 0:
if self.val_loader is not None:
val_metrics = self.validate(split="val", epoch=epoch)
val_metrics = self.validate(
split="val",
epoch=epoch - 1 + (i + 1) / len(self.train_loader),
)
if (
val_metrics[
self.config["task"].get(
Expand Down

0 comments on commit 105175e

Please sign in to comment.