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

Cleanup the train function. #7377

Merged
merged 2 commits into from
Nov 2, 2021
Merged

Conversation

trivialfis
Copy link
Member

  • Move attribute setter to callback.
  • Remove the internal train function.

We have been reducing the size of the train function by moving most of the code logic into callbacks. This PR moves early stopping attributes into the callback container. Logically it should be part of the EarlyStopping callback, but for compatibility reasons that in older versions of XGBoost, these attributes were presented regardless of whether early stopping is actually used.

Finally, the internal train function is removed, since the train is just a one-line call to the internal train.

* Move attribute setter to callback.
* Remove the internal train function.
@trivialfis trivialfis merged commit c74df31 into dmlc:master Nov 2, 2021
@trivialfis trivialfis deleted the merge-train-fn branch November 2, 2021 10:00
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.

2 participants