-
Notifications
You must be signed in to change notification settings - Fork 282
CI: add meta-analysis notebook and modularize rendering workflow #3742
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
base: develop
Are you sure you want to change the base?
CI: add meta-analysis notebook and modularize rendering workflow #3742
Conversation
Signed-off-by: Aritra Dey <[email protected]>
Signed-off-by: Aritra Dey <[email protected]>
Signed-off-by: Aritra Dey <[email protected]>
Signed-off-by: Aritra Dey <[email protected]>
Signed-off-by: Aritra Dey <[email protected]>
.github/notebooks.yaml
Outdated
| @@ -0,0 +1,4 @@ | |||
| notebooks: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Nitpick: Can we rename this
notebooks.ymlinstead of mixing "yaml" and "yml" extensions? - More substantive: Am I right this is only used by reading it into
workflows/render-quarto.yml? If so, why not define it directly in that file[*]? Feels confusing to have the list of notebooks live in a third place that's neither alongside the files nor alongside the code that uses them.
[*]possibly it could be specified as a matrix that could then be processed in parallel? I haven't looked carefully, so may be missing a reason that wouldn't work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, why not define it directly in that file[*]?
Yes, it is used by the render-quarto workflow, so it can definitely be kept in that file itself. will do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[*]possibly it could be specified as a matrix that could then be processed in parallel? I haven't looked carefully, so may be missing a reason that wouldn't work
I've considered this before.I am slightly against this, particularly for this workflow, since we only use parallel tasks when they are long-running. In this case, rendering demo 1 takes approximately 20 seconds, and the meta-analysis takes about the same time. The uncertainty notebook, however, takes longer which is around 150 seconds.
Considering these durations, if we run them in parallel, we first need to build the base image and then render the notebooks. For each parallel matrix job, additional time is spent pulling the image and setting up the job, which will defintely end up taking more total time than the actual rendering.
Also after rendering the notebooks, we have to merge the artifacts in order to commit the changes to the documentation repository, which again adds more overhead compared to what we are doing atm.So, do you think we should consider this approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 No need to consider further! "setup and postprocessing make sense to do once and they take longer than rendering" is enough reason by itself to to not bother with parallel yet (or possibly ever).
Signed-off-by: Aritra Dey <[email protected]>
0b3a7bf to
f3e34a3
Compare
| echo "r_files=$r_files" >> $GITHUB_OUTPUT | ||
| echo "render_cmd=$render_cmd" >> $GITHUB_OUTPUT | ||
| echo "paths=$paths_out" >> $GITHUB_OUTPUT | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it stay true that we want this job to render and upload every Quarto notebook in the tutorials directory? If so I think you could remove this entire block and avoid needing to update this file in the future by using shell wildcards below: quarto render /work/documentation/tutorials/**/*.qmd --to html, for p in documentation/tutorials/**/*.qmd; do, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Obviously this suggestion is completely incompatible with my retracted parallel rendering idea!)
Description
This PR adds the newly introduced meta-analysis notebook to the CI rendering workflow to ensure it compiles successfully after #3707.
Additionally, a new
notebooks.yamlfile has been introduced to improve maintainability.When new notebooks are added to the repo, only their paths need to be listed innotebooks.yaml, avoiding direct changes to the render-quarto.yaml gh action workflow.Motivation and Context
Review Time Estimate
Types of changes
Checklist: