-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC Ensures that plot_roc_curve passes numpydoc validation #21547
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
Conversation
Addresses #21350 This PR ensures precision_score is compatible with numpydoc: 1. Remove sklearn.metrics._plot.roc_curve.plot_roc_curve from DOCSTRING_IGNORE_LIST. 2. Verify that all tests are passing.
@thomasjpfan @glemaitre Can u help me fix the conflicts? |
sklearn/metrics/_plot/roc_curve.py
Outdated
`plot_roc_curve` is deprecated in 1.0 and will be removed in | ||
1.2. Use one of the following class methods: | ||
:func:`~sklearn.metrics.RocCurveDisplay.from_predictions` or | ||
:func:`~sklearn.metrics.RocCurveDisplay.from_estimator`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to move these lines as it was previously (see the diff).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did as you directed but tests still failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will also need to merge the main
branch into your branch when #21549 will be merged. The last release of setuptools
broke our CIs and they will be working once the PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This separating blank line is still needed but you should not add trailing whitespace:
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]>
If i move the deprecation warning to the original position, tests fail on my local machine. @glemaitre |
Can you please share the error message or push the change so that we all see the error on the CI. I agree with @glemaitre that we want the deprecated directive after the main elements of the docstring. |
Hi @MrinalTyagi
If you can find some time to fix the lint error
then tests will be run on the CI and it will be easier to find what is going wrong. Thanks! |
thank you for the help. :) |
Can someone merge this pr? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can someone merge this pr?
No since you have not addressed this comment #21547 (comment) which is a rephrasing of the first comment of @glemaitre: #21547 (comment) (if I understand correctly).
Please move the deprecation directive lower in the docstring to keep the most important information first. If you get an error message you do not understand when you run the tests locally, please paste it here as a comment so that we can try to help you or just push the change to the PR so that we have an opportunity to read the message in the CI report.
Ok I understand the problem: the Since we already have the deprecation information in the altered docstring information from the We could probably improve the For now, let's just remove the redundant |
really sorry for not responding to the same as I thought all tests were clear so its all working fine. |
By this you mean to completely remove this section of text, right?
|
This reverts commit dced759.
@glemaitre can u update me if any changes is required as I by mistakenly pushed another issue work in this pr. Sorry for the inconvenience as I am new to this. |
@glemaitre @ogrisel any update on the pr? Let me know if I need to perform any modifications. |
@glemaitre @ogrisel Please tell me how to proceed with the following pr as I have already implemented all the changes requested |
@ogrisel Please tell me how to proceed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MrinalTyagi +1 for completely removing the redundant section in the docstring and only keep the decorator.
Then LGTM (assuming CI is green).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation looks much nicer.
LGTM. I will merge once all CI will be green.
Thanks @MrinalTyagi
Thanks :) |
Merged. Thanks again @MrinalTyagi and sorry for the slow reply. |
…arn#21547) Co-authored-by: Olivier Grisel <[email protected]>
…arn#21547) Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]>
Reference Issues/PRs
Addresses #21350
This PR ensures plot_roc_curve is compatible with numpydoc:
What does this implement/fix? Explain your changes.
Any other comments?