question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move jupyter notebooks out of the project-monai/monai repo

See original GitHub issue

Background The Project-MONAI/MONAI repository now has 20 jupyter notebooks. They are mainly simple and intuitive working demos for the MONAI key features. With the upcoming MONAI educational events, MONAI will likely to have more demos in the form of jupyter notebooks.

Proposal This ticket proposes to move the notebooks out of the project-MONAI/monai repo, to separate the maintenance efforts, and improve the usability. More specifically:

Motivation

  • The notebooks require different types of maintenance efforts compared with the rest of the codebase. it’s currently unclear what/how we enforce the coding format, type hints, benchmarking, usability checks (see also https://github.com/Project-MONAI/MONAI/issues/872).
  • Git version control is not very compatible with the notebooks, this creates burdens for reviewing/verifying them (for example in pull request https://github.com/Project-MONAI/MONAI/pull/884, git diff is a pain)
  • Some content requires additional packages such as matplotlib, it’s unclear how these are managed and integration-tested. This should be decoupled from the main codebase.
  • Some notebooks contain multimedia content which increases the main codebase size
  • Currently, it’s difficult to run notebooks with a pip-installed MONAI package. Because git-cloning notebooks will also automatically download the MONAI dev version (they are coupled). This potentially conflicts with the pip-installed monai at the system site-package level.

A new home for the notebooks

  • option 1: create a Tutorial repo under Project-MONAI org (following the Pytorch org: https://github.com/pytorch/tutorials).
  • option 2: convert the notebooks into html (with colab runnable links), deliver them via http://monai.io/tutorials pages
  • option 3: open to any other suggestions to address the issues mentioned in the previous section

--------- summary of the discussions so far------------------

  • can’t purely rely on colab (the internet access, python version, Numba issues)
  • free plugin: ReviewNB which can help make the git diff of notebook changes
  • notebooks and the core codebase have the tagging/versioning conflicts (need temp. workaround)
  • notebooks tests could/should be automated
  • key notebooks with the main repo, separate repo(s) for full tutorials
  • notebooks need manual checks (e.g. visually check the figures) before any milestones anyway

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
wylicommented, Aug 18, 2020

thanks for the discussions, based on the feedback, we plan to migrate the notebooks to a separate repo, and retain a readme file in this repo with links to them (will categorise the links into essential tutorials, latest features etc.)

notebook quality checks will be addressed by a separate ticket

1reaction
ericspodcommented, Aug 12, 2020

There is an issue of dependency between the notebooks and the codebase, if we write a notebook to rely on the version of MONAI as committed with the notebook then that will be ahead of what we tag for pip. If what we choose to do is state that the notebooks should be for the most recent version installable via pip then they have to be explicitly written that way, which does exclude having experimental notebooks in the codebase.

For versioning using a tools like like ReviewNB makes sense, converting to html isn’t great because you lose the dynamic aspect and it sometimes doesn’t get layed out as well. If we create a new repo for notebooks it has to be something people can check out and immediately use with some information on what dependencies exist such as matplotlib.

We can’t rely on Colab because of the access issue but also they’re stuck on Python 3.6. The notebook I sent around about using Numba with Pytorch didn’t work on Colab for example. I’m sure other things won’t work either.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage Jupyter Notebook Files - Earth Data Science
Learn how to manage Jupyter Notebook files including saving, renaming, deleting, moving, and downloading notebooks.
Read more >
Jupyter Notebooks in a Git Repository - Read the Docs
It is a very nice feature of Jupyter notebooks that cell outputs (e.g. images, plots, tables with data) can be stored within notebooks....
Read more >
Change IPython/Jupyter notebook working directory
Show activity on this post. Call it ipython-notebook. command and make it executable. Put it in the directory you want to work in,...
Read more >
GitHub Version Control for Jupyter Notebooks
After configuring the GitHub repository, you can perform the following tasks to manage the notebook versions: Pushing Commits to GitHub; Viewing and Comparing ......
Read more >
Jupyter Notebook files - GitLab Docs
Jupyter Notebook (previously, IPython Notebook) files are used for interactive computing in many fields. They contain a complete record of the user's ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found