Fix handling of print period in EvaluationMonitor (#6499) (#6534)

Co-authored-by: Kirill Shvets <kirill.shvets@intel.com>

Co-authored-by: ShvetsKS <33296480+ShvetsKS@users.noreply.github.com>
Co-authored-by: Kirill Shvets <kirill.shvets@intel.com>
This commit is contained in:
Jiaming Yuan
2020-12-20 15:07:42 +08:00
committed by GitHub
parent 7109c6c1f2
commit d95d02132a
2 changed files with 16 additions and 11 deletions

View File

@@ -622,7 +622,7 @@ class EvaluationMonitor(TrainingCallback):
msg += self._fmt_metric(data, metric_name, score, stdv)
msg += '\n'
if (epoch % self.period) != 0 or self.period == 1:
if (epoch % self.period) == 0 or self.period == 1:
rabit.tracker_print(msg)
self._latest = None
else: