Skip to content

Commit

Permalink
Fix typo. (#6399)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Nov 17, 2020
1 parent ae16620 commit 3ac173f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python-package/xgboost/callback.py
Expand Up @@ -594,7 +594,7 @@ def __init__(self, rank=0, period=1, show_stdv=False):
self.period = period
assert period > 0
# last error message, useful when early stopping and period are used together.
self._lastest = None
self._latest = None
super().__init__()

def _fmt_metric(self, data, metric, score, std):
Expand Down Expand Up @@ -623,15 +623,15 @@ def after_iteration(self, model, epoch, evals_log):

if (epoch % self.period) != 0:
rabit.tracker_print(msg)
self._lastest = None
self._latest = None
else:
# There is skipped message
self._lastest = msg
self._latest = msg
return False

def after_training(self, model):
if rabit.get_rank() == self.printer_rank and self._lastest is not None:
rabit.tracker_print(self._lastest)
if rabit.get_rank() == self.printer_rank and self._latest is not None:
rabit.tracker_print(self._latest)
return model


Expand Down

0 comments on commit 3ac173f

Please sign in to comment.