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

Skip to content

Try running examples in parallel during doc build #29570

Open
@lesteve

Description

@lesteve

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:

  • 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions