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

Cache examples #373

Merged
merged 5 commits into from
May 5, 2022
Merged

Cache examples #373

merged 5 commits into from
May 5, 2022

Conversation

mkundu1
Copy link
Contributor

@mkundu1 mkundu1 commented May 4, 2022

No description provided.

@akaszynski
Copy link
Contributor

If possible, try including the build times for sphinx-gallery when building. See the build output from
https://github.com/pyansys/pymapdl/runs/6292105801?check_suite_focus=true

For example:

computation time summary:
    - ../../examples/00-mapdl-examples/2d_plate_with_a_hole.py:                                         0.00 sec   0.0 MB
    - ../../examples/00-mapdl-examples/2d_pressure_vessel.py:                                           0.00 sec   0.0 MB
    - ../../examples/00-mapdl-examples/3d_notch.py:                                                     0.00 sec   0.0 MB
    - ../../examples/00-mapdl-examples/3d_plate_thermal.py:                                             0.00 sec   0.0 MB
    - ../../examples/00-mapdl-examples/contact_elements.py:                                             0.00 sec   0.0 MB
    - ../../examples/00-mapdl-examples/geometry.py:                                                     0.00 sec   0.0 MB
    - ../../examples/00-mapdl-examples/mapdl_3d_beam.py:                                                0.00 sec   0.0 MB
    - ../../examples/00-mapdl-examples/mapdl_beam.py:                                                   0.00 sec   0.0 MB

This way, you can tell which examples are being built from scratch and if your cache is working.

@dnwillia-work
Copy link
Collaborator

dnwillia-work commented May 5, 2022

If possible, try including the build times for sphinx-gallery when building. See the build output from https://github.com/pyansys/pymapdl/runs/6292105801?check_suite_focus=true

Looks like it's coming now? From the PR CI run:

image

Though, strange it takes 0 s to build each, :-). Ha, perhaps that is correct though because Sphinx did not build them since they were already there from before?

@mkundu1
Copy link
Contributor Author

mkundu1 commented May 5, 2022

If possible, try including the build times for sphinx-gallery when building. See the build output from https://github.com/pyansys/pymapdl/runs/6292105801?check_suite_focus=true

Looks like it's coming now? From the PR CI run:

image

Though, strange it takes 0 s to build each, :-). Ha, perhaps that is correct though because Sphinx did not build them since they were already there from before?

This shows that the caching mechanism is working. There are 3 CI runs for this PR: The first one didn't have any cache, so it ran all examples. The second one didn't change any example script, so it uses the cache and skips the gallery build. The third one changes the example scripts which invalidates the cache, so it again ran the examples fully (there is an unittest failure in the latest run which I'm looking into).

@dnwillia-work
Copy link
Collaborator

This shows that the caching mechanism is working. There are 3 CI runs for this PR: The first one didn't have any cache, so it ran all examples. The second one didn't change any example script, so it uses the cache and skips the gallery build. The third one changes the example scripts which invalidates the cache, so it again ran the examples fully (there is an unittest failure in the latest run which I'm looking into).

Yeah, perfect then, this is going to help. It appears our CI runners still have some trouble with the parametric workflow:

image

@seanpearsonuk seanpearsonuk self-requested a review May 5, 2022 17:10
@mkundu1 mkundu1 mentioned this pull request May 5, 2022
@mkundu1 mkundu1 requested a review from ajain-work May 5, 2022 17:24
@mkundu1 mkundu1 merged commit 1e9fd1f into main May 5, 2022
@mkundu1 mkundu1 deleted the doc/cache branch May 5, 2022 17:44
seanpearsonuk added a commit that referenced this pull request May 6, 2022
* Fix deprecation warnings due to invalid escape sequence in docstrings (#378)

* Fix deprecation warnings due to invalid escape sequence in docstrings

* Fix unittest

* Cache examples (#373)

* Cache examples

* fix tests by cleaning up an issue in the test util code

* Pytest for the Fault Tolerant Meshing Workflow - exhaust system

* Fixing codespell error

* Fixing codespell error2

* fix tests by cleaning up an issue in the test util code

Co-authored-by: Mainak Kundu <[email protected]>
Co-authored-by: Yogesh Patel <[email protected]>
ypatel-qa added a commit that referenced this pull request May 7, 2022
* Pytest for the Fault Tolerant Meshing Workflow - exhaust system

* Fixing codespell error

* Fixing codespell error2

* Pytest for the Fault Tolerant Meshing Workflow - exhaust system

* Fixing codespell error

* Fixing codespell error2

* fix tests by cleaning up an issue in the test util code (#383)

* Fix deprecation warnings due to invalid escape sequence in docstrings (#378)

* Fix deprecation warnings due to invalid escape sequence in docstrings

* Fix unittest

* Cache examples (#373)

* Cache examples

* fix tests by cleaning up an issue in the test util code

* Pytest for the Fault Tolerant Meshing Workflow - exhaust system

* Fixing codespell error

* Fixing codespell error2

* fix tests by cleaning up an issue in the test util code

Co-authored-by: Mainak Kundu <[email protected]>
Co-authored-by: Yogesh Patel <[email protected]>

* remove one asserted name (#385)

* Renaming end-to-end tests

* Tol change - abs to rel

Co-authored-by: ANSYS\spearson <[email protected]>
Co-authored-by: Sean Pearson <[email protected]>
Co-authored-by: Mainak Kundu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants