Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC move "Global configurations" out of parallelism.rst and into its own site - #34246

Merged
jeremiedbb merged 12 commits into
scikit-learn:mainfrom
StefanieSenger:doc_env_restructure
Jul 27, 2026
Merged

DOC move "Global configurations" out of parallelism.rst and into its own site#34246
jeremiedbb merged 12 commits into
scikit-learn:mainfrom
StefanieSenger:doc_env_restructure

Conversation

@StefanieSenger

@StefanieSenger StefanieSenger commented Jun 11, 2026

Copy link
Copy Markdown
Member

What does this implement/fix? Explain your changes.

This PR moves the section on global configurations and environment variables out of parallelism.rst where it had organically grown into more than just variables for parallel execution. Now it deserves its own little place. :)

This is almost a pure migration PR, contents did not change, just the order of the environment variables, which are now grouped.

SKLEARN_SKIP_OPENMP_TEST and SKLEARN_TEST_NO_OPENMP which are relatively new, are added with a short description.

AI usage disclosure

I used AI assistance for:

  • Documentation (including examples)
  • Research and understanding

My Agent did this PR, but I checked that

  • the description text of the variables stays the same (except for some slight changes that I did or the agent did on my request, slight improvements)
  • the links all work

Comment thread doc/developers/global_configuration.rst Outdated
@StefanieSenger
StefanieSenger marked this pull request as ready for review June 11, 2026 12:51
@StefanieSenger
StefanieSenger marked this pull request as draft June 11, 2026 15:24
@StefanieSenger
StefanieSenger marked this pull request as ready for review June 11, 2026 16:56
@StefanieSenger StefanieSenger changed the title Doc move "Global configurations" out of parallelism.rst and into its own site DOC move "Global configurations" out of parallelism.rst and into its own site Jun 12, 2026
@StefanieSenger

Copy link
Copy Markdown
Member Author

@AnneBeyer and @ArturoAmorQ, would you like to have a look?

@AnneBeyer AnneBeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, @StefanieSenger! This makes a lot of sense and the new structure is much clearer than before.
One small suggestion below, otherwise LGTM!
@ArturoAmorQ or @lesteve, could you have a look as well?

Comment thread doc/developers/global_configuration.rst Outdated
@github-project-automation github-project-automation Bot moved this to Todo in Labs Jun 29, 2026
@StefanieSenger StefanieSenger moved this from Todo to In progress in Labs Jun 29, 2026
@StefanieSenger StefanieSenger added the Waiting for Second Reviewer First reviewer is done, need a second one! label Jun 29, 2026
@StefanieSenger StefanieSenger moved this from In progress to PR waiting for reviews in Labs Jun 29, 2026

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR. Just a small remark. Looks good otherwise

Comment thread doc/computing/parallelism.rst Outdated
Comment on lines +63 to +66
:ref:`SKLEARN_WORKING_MEMORY <envvar_SKLEARN_WORKING_MEMORY>` sets the default value for
the `working_memory` argument of :func:`sklearn.set_config`. See
:ref:`global_configuration` for this and other scikit-learn configuration environment
variables.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

working_memory is not what controls the behavior of joblib's auto-memmapping. To control it you need to use joblib.parallel_config(max_nbytes=...) for instance.

working_memory is not related to parallelism. It limits the size of intermediate arrays in a a few specific places in sklearn (I believe only stuff related to pairwise distances + argmin currently).

@lesteve

lesteve commented Jul 23, 2026

Copy link
Copy Markdown
Member

It kind of makes sense because the filename does not make any sense.

At the same I personally I kind of like the fact that all the SKLEARN_ variables were mentioned in a single place in the doc. So I am overall +0 🤷. Basically I am very often "Hmmm I seem to remember there is a SKLEARN_ variable for this but I don't remember which one", I look at this single doc page and I find it. Yes I could use git grep even if the info is in different pages but it's a tiny bit less convenient.

@lesteve

lesteve commented Jul 23, 2026

Copy link
Copy Markdown
Member

Having said this, I am willing to override myself (or be overriden by another maintainer) because I think we have a lot of room for improvement to be less conservative/more adventurous in general, and in particular for things that have no effect whatsoever on users.

Developer docs is a good example of such a place IMO. It doesn't affect users and Anne thought this was better like this, sure why not, let's do this, bim merged.

In this PR's case, there are micro-impacts on the user e.g. SKLEARN_ASSUME_FINITE is documented in another page but 🤷. Also, I would guess that it's not used too much in practice so we don't really care ...

@thomasjpfan thomasjpfan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall, I am +1 on putting all the environment variables in one place (also out of parallelism.rst).

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks !

@jeremiedbb
jeremiedbb merged commit 7c42ab6 into scikit-learn:main Jul 27, 2026
38 checks passed
@github-project-automation github-project-automation Bot moved this from PR waiting for reviews to Done in Labs Jul 27, 2026
@StefanieSenger
StefanieSenger deleted the doc_env_restructure branch July 27, 2026 13:47
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 8, 2026
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants