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

update python docs some mistakes #10058

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Conversation

UncleLLD
Copy link
Contributor

  • doc/python/callbacks.rst,the original code reported an error as follows:
    image

after change Valid into Train, it is ok

  • doc/python/sklearn_estimator.rst, the original code reported an error as follows:
    image

after change Validation_0 into validation_0, it is ok

@@ -49,7 +49,7 @@ inside iteration loop. You can also pass this callback function directly into X
verbose_eval=False)

dump = booster.get_dump(dump_format='json')
assert len(early_stop.stopping_history['Valid']['CustomErr']) == len(dump)
assert len(early_stop.stopping_history['Train']['CustomErr']) == len(dump)
Copy link
Member

Choose a reason for hiding this comment

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

apologies for the mistake, I think we should modify the previous the data_name in line 39 to data_name="Valid" instead since it doesn't make sense to early stop with the training data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

apologies for the mistake, I think we should modify the previous the data_name in line 39 to data_name="Valid" instead since it doesn't make sense to early stop with the training data.

yes, you are right! I have changed it again, please review, thanks!

Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

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

Thank you for the fix!

@trivialfis trivialfis merged commit b9171d8 into dmlc:master Feb 22, 2024
24 of 29 checks passed
@UncleLLD UncleLLD deleted the update-python-docs branch February 22, 2024 14:39
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