Skip to content

Commit

Permalink
fix(torch): add measures to output event when training not done
Browse files Browse the repository at this point in the history
an empty metrics field breaks the platform, and metrics field remains empty when the training is stopped early
  • Loading branch information
Bycob committed Mar 16, 2023
1 parent 4fe0df7 commit 5714767
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/backends/torch/torchlib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1291,11 +1291,8 @@ namespace dd
}
}

if (elapsed_it == iterations)
{
out.add("measure", meas_out.getobj("measure"));
out.add("measures", meas_out.getv("measures"));
}
out.add("measure", meas_out.getobj("measure"));
out.add("measures", meas_out.getv("measures"));
}

train_loss = 0;
Expand Down

0 comments on commit 5714767

Please sign in to comment.