Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo. #6399

Merged
merged 1 commit into from Nov 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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