-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Run changed notebooks in CI #409
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
We need to ensure that notebooks which are heavily featured in our docs are actually working
Solution
Implement a workflow to convert a list of specified notebooks into scripts that can be run in CI. For each notebook (which is a json document with an
*.ipynb
file extension):nbformat
packge to iterate through notebook cellspip install
steps, include those in arun.sh
bash setup script to activate and configure a venv with required dependenciesnotebook.py
run.sh
script to install needed dependencies and execute thenotebook.py
scriptSince some notebooks are quite slow/lengthy (for example, if computing embeddings across a large sample dataset) and there are a lot of them (over 200 notebooks in this repo), we won't run every notebook on every push because that would be slow/expensive and deter people from making small improvements. Instead, we will only run those notebooks which have changed relative to the master branch.
Some notebooks may fail until minor adjustments are made to them to account for implicit dependencies on things installed in the colab environment that are not available in our CI environment. For example, we may need to add a missing a statement like
!pip install pandas
instead of just using it directly.Type of Change