TransmogrifAI Samples on Jupyter

In this section we will look at how TransmogrifAI can be run within Scala notebooks on Jupyter.

We are going to leverage beakerx Scala kernel for Jupyter

Setup BeakerX on Linux / Ubuntu

Prequisities :

  • docker
  • git client

Reference : beakerx_docs

Setup BeakerX on Mac with Docker

BeakerX provides a beakerx_docker image on docker hub.

Clone the code

Sample notebooks are stored in the repo

git clone

Assuming your Transmogrify source code is downloaded at /Users/rdua/work/github/rajdeepd/transmogrifai-samples.

We need the directory above so that we can mount sample notebooks and dataset into the container using docker volumes.

Increase the RAM available to Docker container

Mac Users

Increase the Memory available to docker containers from the docker UI as shown below


Ubuntu Users

Increase the the Memory available using docker command with –memory 6g while creating the docker containe, refer to the section Run the beakerx Container below


export TM_SAMPLE_PATH=<transmogrifai-sample directory>

Run the beakerx Container


docker run -p 8888:8888 -v $TM_SAMPLE_PATH/:/home/beakerx/transmogrifai-samples  \
      --name transmogrifai-container-1 beakerx/beakerx


docker run -p 8888:8888 -v $TM_SAMPLE_PATH/:/home/beakerx/transmogrifai-samples \
      --memory 6g --name transmogrifai-container-1 beakerx/beakerx

Trouble Shooting

In case you don’t see transmogrifai-samples folder in your home page, you can upload the notebooks manually and
run the notebooks.

Exposing jupyter notebook on another port

docker run -p 8800:8888 -v ...

Copying `transmogrifai-samples` directory manually from host to the container

docker cp ./transmogrifai-samples/. <container_id>:/

Get Token from docker containers

docker exec <container_id> /opt/conda/envs/beakerx/bin/jupyter notebook list

Commands above will download the image (which takes a few minutes first time) and start the container. It will also publish the url and the token to access the container

Sample url is shown : http://localhost:8888/?token=<sometoken>

On opening the image in the browser you will notice that in the home page


Sample Notebooks

Following notebooks are currently available

Simple Regression Notebook


Next Steps

Run the Simple Regression notebook. Open the notebook at the following url or navigate from within Jupyter UI.


Run each cell manually or from the navigaiton menue press Cell –> Run All