Skip to content

FIX set docstrings on sklearn.utils.fixes.threadpool_limits/info #21338

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@
"sklearn.utils.extmath.weighted_mode",
"sklearn.utils.fixes.delayed",
"sklearn.utils.fixes.linspace",
# To be fixed in upstream issue:
# https://github.com/joblib/threadpoolctl/issues/108
"sklearn.utils.fixes.threadpool_info",
"sklearn.utils.fixes.threadpool_limits",
"sklearn.utils.gen_batches",
"sklearn.utils.gen_even_slices",
"sklearn.utils.get_chunk_n_rows",
Expand Down
6 changes: 6 additions & 0 deletions sklearn/utils/fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,15 @@ def threadpool_limits(limits=None, user_api=None):
return threadpoolctl.threadpool_limits(limits=limits, user_api=user_api)


threadpool_limits.__doc__ = threadpoolctl.threadpool_limits.__doc__


def threadpool_info():
controller = _get_threadpool_controller()
if controller is not None:
return controller.info()
else:
return threadpoolctl.threadpool_info()


threadpool_info.__doc__ = threadpoolctl.threadpool_info.__doc__