The Jupyter ProActive Kernel adds a kernel backend to Jupyter. This kernel interfaces directly with the ProActive scheduler and constructs tasks and workflows to execute them on the fly. With this interface, users can run their code locally and test it using a native python kernel, and by a simple switch to ProActive kernel, run it on remote public or private infrastructures without having to modify the code.

This tutorial will show you how to:

  1. Install the Jupyter ProActive Kernel.
  2. Create a job through a notebook.
  3. Submit to the scheduler and visualize results.

1 Install the Jupyter ProActive Kernel


Follow these steps to install the required Python environment:

  1. Go to Anaconda
  2. Download the Anaconda3 distribution related to your OS
  3. Double click on the saved file and follow the steps

If you have a Python environment installed on your machine, to be able to install and use the ProActive Kernel please make sure you install also the following required libraries:

  • pexpect (version >=4.0)
  • proactive
  • jupyter_client
  • IPython
  • traitlets
  • ipykernel
  • notebook
  • configparser
  • matplotlib
  • networkx
  • pygraphviz
  • tornado (version == 5.1.1)

To install the Jupyter ProActive Kernel, open a terminal and run:

$ pip install proactive proactive-jupyter-kernel --upgrade
$ python -m proactive-jupyter-kernel.install

To create a Jupyter notebook:

  1. Open Jupyter lab by running on your terminal:
    $ jupyter lab
  2. Click on the ProActive icon.
  3. Rename your notebook.

2 Create a job through a notebook

To create a ProActive job, fill the coding blocks of your notebook according to the following instructions:

  • 1st block:
  • #%connect(login=YOUR_LOGIN,password=YOUR_PASSWORD)
    If you do not have yet an ActiveEon account, please sign up on the try platform. It's free!

  • 2nd block: creating a first task:
  • #%task(name=t1)
    print('Hello world')
    result='Task1_OK'
  • 3rd block: creating a second task that depends on the first:
  • #%task(name=t2, dep=[t1])
    print('From Jupyter Kernel!')
    result='Task2_OK'
  • 4th block: verifying the workflow:
  • #%draw_job()

3 Submit to the scheduler and visualize results

To submit the ProActive job to the scheduler and check its execution, use the following pragmas:

  • 5th block: submitting the job to the scheduler:
  • #%submit_job()
  • 6th block: monitoring execution:
  • #%show_scheduling_portal()

When done with this tutorial, you can move on to: