Skip to content

DOC add reference to higher level functions in estimator_checks_generator #31480

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adrinjalali
Copy link
Member

Suggested in #31408 to help third party developers.

Copy link

github-actions bot commented Jun 4, 2025

❌ Linting issues

This PR is introducing linting issues. Here's a summary of the issues. Note that you can avoid having linting issues by enabling pre-commit hooks. Instructions to enable them can be found here.

You can see the details of the linting issues under the lint job here


ruff check

ruff detected issues. Please run ruff check --fix --output-format=full locally, fix the remaining issues, and push the changes. Here you can see the detected issues. Note that the installed ruff version is ruff=0.11.7.


sklearn/utils/estimator_checks.py:513:75: W291 Trailing whitespace
    |
511 |     :func:`~sklearn.utils.estimator_checks.check_estimator` to yield all check callables
512 |     for an estimator. In most cases, these functions should be used instead. When
513 |     implementing a custom equivalent, please refer to their source code to 
    |                                                                           ^ W291
514 |     understand how `estimator_checks_generator` is intended to be used.
    |
    = help: Remove trailing whitespace

Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).

ruff format

ruff detected issues. Please run ruff format locally and push the changes. Here you can see the detected issues. Note that the installed ruff version is ruff=0.11.7.


--- sklearn/utils/estimator_checks.py
+++ sklearn/utils/estimator_checks.py
@@ -510,7 +510,7 @@
     :func:`~sklearn.utils.estimator_checks.parametrize_with_checks` and
     :func:`~sklearn.utils.estimator_checks.check_estimator` to yield all check callables
     for an estimator. In most cases, these functions should be used instead. When
-    implementing a custom equivalent, please refer to their source code to 
+    implementing a custom equivalent, please refer to their source code to
     understand how `estimator_checks_generator` is intended to be used.
 
     .. versionadded:: 1.6

1 file would be reformatted, 922 files already formatted

Generated for commit: e6e19ae. Link to the linter CI: here

Copy link
Member

@virchan virchan left a comment

Choose a reason for hiding this comment

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

LGTM!

Just a minor suggestion. Totally optional though.

Co-authored-by: Virgil Chan <virchan.math@gmail.com>
Copy link
Member

@virchan virchan left a comment

Choose a reason for hiding this comment

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

Woops~ Messed up the linting 😅

:func:`~sklearn.utils.estimator_checks.parametrize_with_checks` and
:func:`~sklearn.utils.estimator_checks.check_estimator` to yield all check callables
for an estimator. In most cases, these functions should be used instead. When
implementing a custom equivalent, please refer to their source code to
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
implementing a custom equivalent, please refer to their source code to
implementing a custom equivalent, please refer to their source code to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants