-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC Improve docstrings for scikit-learn configuration functions #31486
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
base: main
Are you sure you want to change the base?
Conversation
…onfig, config_context)
This function can be used to modify the global scikit-learn configuration at this | ||
runtime. Passing `None` as an argument (the default) leaves the corresponding |
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 function can be used to modify the global scikit-learn configuration at this | |
runtime. Passing `None` as an argument (the default) leaves the corresponding | |
This function can be used to modify the global scikit-learn configuration at | |
runtime. Passing `None` as an argument (the default) leaves the corresponding |
It is recommended to use this context manager over :func:`set_config` for | ||
experimental features (such as `array_api_dispatch` or `enable_metadata_routing`), | ||
as their support is not yet consistently available across the library. |
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.
That's not true. Using context managers for such settings actually probably results in confusion. I'd remove the paragraph.
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.
Genuine question, I didn't realise this? In the array API docs this is what we seem to suggest: https://scikit-learn.org/dev/modules/array_api.html#pytorch-support
This PR improves the docstrings of
set_config
,get_config
,config_context
, to help users understand how to use them.Specifically:
None
) and global defaults