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

[Breaking] Change default evaluation metric for binary:logitraw objective to logloss #6647

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Jan 27, 2021

@hcho3 hcho3 requested a review from trivialfis January 27, 2021 15:23
<< "' to '" << after << "'. Explicitly set eval_metric if you'd like to "
<< "restore the old behavior.";
const std::string& after, const std::string& version) {
LOG(WARNING) << "Starting in XGBoost " << version << ", the default evaluation metric "
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note. We should plan to remove this warning soon. Probably right after 1.4.0 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning got extra verbose when using distributed training. All workers are printing it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the warning go to logging or stdout?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hcho3 stdout

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the _log_calback function in xgboost/core.py.

Copy link
Collaborator Author

@hcho3 hcho3 Jan 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. We could modify _log_callback to use the logging module. Alternatively, we could simply remove the warning message here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do both in the future, but it will be another breaking change. To use logging, one needs to know the verbosity. So _log_callback should have 2 parameters _log_callback(msg: str, verbosity: int) to indicate the level of current message.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Let's remove the warning message after 1.4.0 release.

@lorentzenchr
Copy link
Contributor

Is there a test for the changed behaviour or a test to adapt because of the change?

@hcho3
Copy link
Collaborator Author

hcho3 commented Jan 28, 2021

Is there a test for the changed behaviour or a test to adapt because of the change?

Unlike #6183, not much of the existing code is affected by this change, since binary:logitraw is not used as often as binary:logistic.

Copy link
Contributor

@lorentzenchr lorentzenchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, too 👍

@hcho3 hcho3 merged commit 0f2ed21 into dmlc:master Jan 28, 2021
@hcho3 hcho3 deleted the logloss_default branch January 28, 2021 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change default evaluation metric for binary:logitraw to logloss, to be consistent with binary:logistic
3 participants