Skip to content
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

Distribute docs build over number of CPUs. #2235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cosenal
Copy link
Contributor

@cosenal cosenal commented Mar 18, 2024

Description

An attempt to speed up docs build (related to #2083, but not the same as that's about RTD).
It looks like the bottleneck is the notebook execution. MyST-NB is parallel-friendly, hence this attempt.

Some data points from testing this on my local machine (Apple M2 Pro):

Build time make docs-clean
Serial 962.92s user 424.57s system 193% cpu 11:57.48 total
Parallel 1052.97s user 250.09s system 443% cpu 4:53.88 total

License

  • I license this contribution under the terms of the GNU GPL, version 3 and grant Unitary Fund the right to provide additional permissions as described in section 7 of the GNU GPL, version 3.

Before opening the PR, please ensure you have completed the following where appropriate.

N/A - [ ] I added unit tests for new code.
N/A - [ ] I used type hints in function signatures.
N/A - [ ] I used Google-style docstrings for functions.
N/A - [ ] I updated the documentation where relevant.

  • Added myself / the copyright holder to the AUTHORS file

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello @cosenal, thank you for submitting a PR to Mitiq! We will respond as soon as possible, and if you have any questions in the meantime, you can ask us on the Unitary Fund Discord.

@nathanshammah
Copy link
Member

Nice! It's failing here, not sure why.

@cosenal
Copy link
Contributor Author

cosenal commented Mar 18, 2024

@nathanshammah Yes, I cancelled the workflow, because I saw it failing on the docs build, which I am investigating. I am leaving it as a Draft PR until the build is fixed.

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (c0688d8) to head (8b5530d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2235   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files          92       92           
  Lines        4161     4161           
=======================================
  Hits         4108     4108           
  Misses         53       53           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nathanshammah
Copy link
Member

Is this blocked by the PyData Sphinx theme action?

@cosenal
Copy link
Contributor Author

cosenal commented Mar 28, 2024

@nathanshammah indeed – I have just dropped a comment there

@cosenal cosenal added documentation Improvements or additions to documentation monitor-for-external-solution Tracking issues caused by external packages labels Apr 1, 2024
@cosenal cosenal marked this pull request as ready for review June 26, 2024 21:45
@cosenal
Copy link
Contributor Author

cosenal commented Jun 27, 2024

Since v0.15.4, the Sphinx theme enabled parallel write. The next blocking factor is Jupyter-cache not supporting parallel execution, see executablebooks/jupyter-cache#37 and sphinx-doc/sphinx#12481.

@cosenal cosenal force-pushed the sphinx-build-parallel branch from c92ca46 to 8b5530d Compare November 5, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation monitor-for-external-solution Tracking issues caused by external packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants