jupyter

A command to start a Jupyter notebook for a given pipeline, providing access to its modules and their outputs.

class JupyterCmd[source]

Bases: pimlico.cli.subcommands.PimlicoCLISubcommand

Creates and runs a Jupyter notebook for the loaded pipeline. The pipeline is made easily available within the notebook, providing a way to load the modules and get their outputs.

This is a useful way to explore the data or analyses coming out of your modules. Once a module has been run, you can load it from a notebook and manipulate, explore, visualize, etc to results.

A new directory is automatically created in your project root to contain the pipeline’s notebooks. (You can override the location of this using --notebook-dir). An example notebook is created there, to show you how to load the pipeline.

From within a notebook, load a pipeline like so:

from pimlico import get_jupyter_pipeline
pipeline = get_jupyter_pipeline()

Now you can access the modules of the pipeline through this pipeline object:

mod = pipeline["my_module"]

And get data from its outputs (provided the module’s been run):

print(mod.status)
output = mod.get_output("output_name")
command_name = 'jupyter'
command_help = 'Create and start a new Jupyter notebook for the pipeline'
add_arguments(parser)[source]
run_command(pipeline, opts)[source]
make_notebook(code_text)[source]