Skip to content

Update demo notebook dependencies and initialization cells - #531

Open
zitterbewegung wants to merge 22 commits into
developfrom
colab_easy_fix_redo
Open

Update demo notebook dependencies and initialization cells#531
zitterbewegung wants to merge 22 commits into
developfrom
colab_easy_fix_redo

Conversation

@zitterbewegung

Copy link
Copy Markdown
Collaborator

This PR updates demo notebook dependency/install and initialization cells to improve notebook execution consistency. Two notebooks were removed due to different locations.

Updated notebooks:

  • demos/elliptic-pde.ipynb
  • demos/iris.ipynb
  • demos/qei-demo-for-blog.ipynb

Supersedes PR #384.

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.06%. Comparing base (ab0969b) to head (f359455).
⚠️ Report is 50 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #531   +/-   ##
========================================
  Coverage    87.06%   87.06%           
========================================
  Files           88       88           
  Lines         7106     7106           
========================================
  Hits          6187     6187           
  Misses         919      919           
Flag Coverage Δ
alltests 87.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread demos/elliptic-pde.ipynb

@sou-cheng-choi sou-cheng-choi May 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@zitterbewegung

Thanks for working on Colab/demo notebook consistency. Please address the following issues before merging.

  1. Please fix the CI test failures. When implementing these fixes, it is crucial that the changes injected into the notebooks remain minimal and consistent with the latest develop branch content. For example, the content in demos/elliptic-pde.ipynb currently differs from the develop branch, beyond the cell you added to import google.colab. Leave the other cells (code, markdown, or outputs) unchanged.

  2. Please correct the typo "dependancies" found in the comments.

  3. Please test updated notebooks in Google Colab.

    a) I have not been able to open for example gbm_demo.ipynb in Colab by clicking the "Open in Colab" button in my local notebooks. Please check and make sure the buttons work.

    b) The notebook elliptic-pde.ipynb opens successfully via the "Open in Colab" button, but it runs with errors.

@zitterbewegung zitterbewegung May 22, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I will restructiure this branch to reflect the new version of develop I have been working on with codex.

  • CI tests are passing
  • Fix Typo
  • Correct updated notebooks in google colab

Comment thread demos/iris.ipynb

@sou-cheng-choi sou-cheng-choi May 23, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for your continued work on this task.

I have three follow-up questions regarding the implementation and scope:

  1. Is the redirection >> /dev/null truly necessary in the installation cells and is it a good practice to hide installation error message?
  2. Is "import os" necessary?
  3. I noticed that gbm_demo.ipynb, elliptic-pde.ipynb, and iris.ipynb still have run-time errors in Colab. Could you ensure these notebooks and others are Colab-ready?
  4. Given that the demos directory contains over 40 notebooks, and this PR has covered 15, is there a way we could create a task (perhaps in makefile) to ensure Colab-notebook consistency across the entire suite, which is growing in number over time?

I appreciate your help and thought in making this process robust!

@zitterbewegung zitterbewegung May 25, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  1. Piping to dev null suppresses all output of installation. If there is an error message we should catch that before we release that
  2. import os will be removed
  3. Pending
  4. We should make a template instead of a makefile. The notebooks would have to be tested on google colab.

@sou-cheng-choi

Copy link
Copy Markdown
Member

@zitterbewegung

Following up on our review meeting yesterday, I have added scripts to improve the notebooks' compatibility with Colab. Please review and test these scripts in both the local development environment and the Colab platform.

@zitterbewegung

zitterbewegung commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

The information previously in this comment has been moved to the Jupyter notebook QA document see the second sheet of the following https://docs.google.com/spreadsheets/d/17KJoNhVyJBGuWoBqz1oujnAvuUm_8CrJ/edit?pli=1&gid=830782523#gid=830782523

@sou-cheng-choi

Copy link
Copy Markdown
Member

@zitterbewegung I don't follow the checklist you made on Jun 4. Kindly elaborate.

@zitterbewegung

zitterbewegung commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

The information had been moved to the QA notebook spreadsheet we were using. See https://drive.google.com/drive/u/0/mobile/recent?dmr=1&ec=wgc-drive-%5Bmodule%5D-goto
If you have more questions we can address it at the large group meeting.

@sou-cheng-choi

Copy link
Copy Markdown
Member

@zitterbewegung

What is the status of this PR?

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.

2 participants