Fix period in evaluation monitor. (#6441)

This commit is contained in:
Jiaming Yuan
2020-11-28 14:18:33 -05:00
committed by Hyunsu Cho
parent 8a0db293c5
commit a2c778e2d1
2 changed files with 24 additions and 18 deletions

View File

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