Skip to content

CourierKyn/colabmill

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Colabmill

Colabmill is a tool for parameterizing, executing, and analyzing Colab-flavored Jupyter Notebooks.

Colabmill lets you do what Papermill does, but optimized for Colab-flavored Jupyter Notebooks:

  • parameterize notebooks, following Colab Form syntax
  • execute notebooks online/offline

Installation

From the command line:

pip install "colabmill @ git+https://github.com/CourierKyn/colabmill"

For all optional io dependencies, you can specify individual bundles like s3, or azure -- or use all

pip install "colabmill[all] @ git+https://github.com/CourierKyn/colabmill"

Python Version Support

This library currently supports Python 3.6+ versions. As minor Python versions are officially sunset by the Python org Colabmill will similarly drop support in the future.

Usage

Parameterizing a Notebook

To parameterize your notebook designate a cell with the comment #@param [...].

parameterize

Colabmill looks for the #@param cell and treats this cell as defaults for the parameters passed in at execution time. Colabmill will add a new cell containing #@title Parameters injected with input parameters in order to overwrite the values with #@param. If no cell contains #@param the injected cell will be inserted at the top of the notebook.

Additionally, if you rerun notebooks through Colabmill and it will reuse the #@title Parameters injected cell from the prior run. In this case Colabmill will replace the old #@title Parameters injected cell with the new run's inputs.

parameters-injected

Executing a Notebook

The two ways to execute the notebook with parameters are: (1) through the Python API and (2) through the command line interface.

See Papermill.

Development Guide

Read CONTRIBUTING.md for guidelines on how to setup a local development environment and make code changes back to Colabmill.

For development guidelines look in the DEVELOPMENT_GUIDE.md file. This should inform you on how to make particular additions to the code base.

Documentation

See the Papermill documentation on ReadTheDocs.

About

📚 Parameterize, execute, and analyze notebooks

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 84.0%
  • Jupyter Notebook 16.0%