You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect that for scikit-learn the speed-up may be a little bit less than for matplotlib since some examples are already using multiple cores (e.g. with n_jobs=2). I had a quick look during the sphinx-gallery PR and it was making the doc a bit quicker locally: sphinx-gallery/sphinx-gallery#877 (comment).
General directions:
configure sphinx-gallery to use 2 cores in doc/conf.py
sphinx_gallery_conf= {
...
'parallel': 2,
}
open a PR with [doc build] commit to do a full build
also generate the doc locally e.g. with spin docs clean + spin docs html and see how much sphinx-gallery parallel settings make a difference
The text was updated successfully, but these errors were encountered:
With parallel=12, this seems to hang (probably need to setup OPENBLAS_NUM_THREADS and other environment variables).
From your comment, I suspect there is oversubscription with parallelizing sphinx gallery. With n_jobs=2, it'll set OPENBLAS_NUM_THREADS to joblib.cpu_count() // 2.
Since CicleCI has 2 cores, I suspect we could set OPENBLAS_NUM_THREADS=1 and use 2 cores for sphinx-gallery. This should work for a majority of examples. The only issue would be examples that set n_jobs=-1 or n_jobs>=2, which would oversubscribe.
Yep this is a good point to bear in mind, while we are at it setting OMP_NUM_THREADS=1 is probably a good idea as well.
Side-comment: matplotlib use a CircleCI large runner for its doc build (4 cores 8GB RAM, rather than 2 cores 4GB RAM) , so I guess this may be something to look at for scikit-learn but there may be some caveats.
Uh oh!
There was an error while loading. Please reload this page.
We are already using sphinx-gallery 0.17 which has added the feature to run examples in parallel see sphinx-gallery/sphinx-gallery#877. See sphinx-gallery doc for how to configure it.
matplotlib is currently trying it and it seems to show interesting improvements in their CI see matplotlib/matplotlib#28617 (comment).
I expect that for scikit-learn the speed-up may be a little bit less than for matplotlib since some examples are already using multiple cores (e.g. with
n_jobs=2
). I had a quick look during the sphinx-gallery PR and it was making the doc a bit quicker locally: sphinx-gallery/sphinx-gallery#877 (comment).General directions:
doc/conf.py
[doc build]
commit to do a full buildspin docs clean
+spin docs html
and see how much sphinx-gallery parallel settings make a differenceThe text was updated successfully, but these errors were encountered: