Jovian: The platform for all your Data Science projects

Jovian logo

Jovian.ml is a platform for sharing and collaboraring on Jupyter notebooks and data science projects. jovian-py is an open-source Python package for uploading your data science code, Jupyter notebooks, ML models, hyperparameters, metrics etc. to your Jovian.ml account.

Installation

The jovian python library can be installed using the pip package manager. To install jovian via terminal or command line, run:

pip install jovian --upgrade

You can also install the jovian library directly within a Jupyter Notebook, by running the following command in a code cell:

!pip install jovian --upgrade

Caution

If you get a Permission denied error, try installing with sudo permission (on Linux/Mac).

$ sudo pip install jovian --upgrade

Another alternative is to try installing with the --user flag, but you’ll need to ensure that the target directory is added to your system PATH.

$ pip install jovian --upgrade --user

Once the installation is complete, you can start uploading Jupyter notebooks to Jovian.

Configuration (for Jovian Pro users only)

If you are a Jovian Pro user, run the following commands on the terminal (or command line) to connect the jovian library with your company’s internal Jovian Pro site:

jovian configure

You can also do this directly within a Jupyter notebook, by executing the following inside a code cell:

import jovian
jovian.configure()

The above command prompts for the following information:

  1. Organization ID: The Organization ID provided by your company for authentication. E.g. if you are accessing Jovian Pro at https://mycompany.jovian.ml , your organization ID is mycompany.

  2. API key: You’ll get the API key when you’re logged in to your organization’s Jovian Pro site. By clicking on the API key button, the key will be copied to clipboard.

jovian api key button

Note

You need to run jovian configure or jovian.configure() only once after installation. Your credentials are cached in the ~/.jovian directory on your computer. You can run jovian reset to clear this configuration.

You can learn more about Jovian Pro here, or start uploading Jupyter notebooks to Jovian in the next section.

Uploading Jupyter Notebooks to Jovian

Jovian allows you to upload and share Jupyter Notebook instantly with a single command, directly within Jupyter. Make sure you’ve completed the installation before reading further.

Uploading Notebooks

Step 1: Import jovian by running the following command within a Jupyter notebook.

import jovian

Step 2: After writing some code, running some experiments, training some models and plotting some charts, you can save and commit your Jupyter notebook.

jovian.commit()

When you run jovian.commit for the first time you’ll be asked to provide an API key, which you can get from your Jovian.ml (or Jovian Pro) account.

jovian api key button

Here’s what jovian.commit does:

  • It saves and uploads the Jupyter notebook to your Jovian.ml (or Jovian Pro) account.

  • It captures and uploads the python virtual environment containing the list of libraries required to run your notebook.

  • It returns a link that you can use to view and share your notebook with friends or colleagues.

jovian commit

For more features of jovian.commit and API reference visit Commit.

Attention

In certain environments like JupyterLab and password protected notebooks, jovian may not be able to detect the notebook filename automatically. In such cases, pass the notebook’s name as the nb_filename argument to jovian.commit.

Benefits of Jovian

Easy sharing and collaboration: Just copy the link to share an uploaded notebook with your friends or colleages. Your notebooks are also visible on your profile page, unless you mark them Secret. You can also add collaborators and let others contribute to your project (learn more).

share jupyter notebook online

Cell-level comments and discussions: Jovian’s powerful commenting interface allows your team to discuss specific parts of a notebook with cell-level comment threads. Just hover over a cell and click the Comment button. You’ll receive an email when someone comments on your notebook, or replies to your comment.

jupyter notebook cell comment

End-to-end reproducibility: Jovian automatically captures Python libraries used in your notebook, so anyone (including you) can reproduce your work on any computer with a single command: jovian clone. You can also use the ‘Run’ dropdown on the Jovian notebook page to run your notebooks on free cloud GPU platforms like Google Colab, Kaggle Kernels and BinderHub.

jupyter notebook clone

This is just a small selection of features that Jovian offers. Continue reading by clicking the Next -> button to learn more, or use the sidebar to jump to a specific section.

Reproducing uploaded notebooks

An uploaded notebook on Jovian.ml can be reproduced in any other machine. Following are the steps involved to reproduce a notebook.

Clone

  1. Visit the link of the uploaded notebook.

  2. Click on the Clone button, to copy the notebook’s clone command to the clipboard.

  3. Paste the command in the terminal, in the directory where you want to clone the notebook project and then run the command.

jovian notebook clone button

The copied command will be of the the following format

jovian clone <username/project-title>
cloning jupyter notebook

Install

Jovian.ml captures the original python environment of the notebook, which make it easier to reproduce the notebook by installing all the required dependencies. The following commands uses Anaconda to install all the required packages, make sure that conda is installed.

Once the notebook is cloned, it would have created a folder with the name of the notebook project.

Move into that directory.

cd jovian-demo

Then run

jovian install

The above command prompts for a virtual environment name where it will install all the required packages. By default it will have the original environment name in the square brackets, just click enter key to retain the name else specify the environment name.

install jovian notebook dependcies

In this way, Jovian.ml seamlessly ensures the end-to-end reproducibility of your Jupyter notebooks across different operating systems.

Note

You have to own the notebook or have to be a collaborator to commit changes to the same notebook project. If not you can commit the cloned notebook with any changes to your Jovian profile as a new notebook project.

Pull

If there are any new versions uploaded after you have cloned the notebook by any of the collaborator. You can use pull to get all those changes.

Move to the cloned directory and run

jovian pull
pull new version of jovian notebook

Attention

Beware any uncommitted changes will be lost during the process of jovian pull. When you pull the notebook it will be a duplicate of the latest version of the notebook on Jovian.

Fork

A fork is a copy of a notebook. Forking a notebook allows you to freely experiment with changes without affecting the original notebook.

When you clone a notebook from Jovian, it creates a local copy of the notebook in your machine. You can fork a notebook instead, to create a copy in your Jovian profile.

Forking a notebook

This procedure assumes that the notebook version you’re trying to Fork is public, or shared with you if it is secret/private. See Collaboration section for more details.

Forking a notebook will save a copy of the Notebook in your Jovian profile.

  1. Visit the notebook version page that you want to Fork.

  2. Click on the Fork button.

  3. This will create a copy of the notebook in your profile, and you will be redirected to the forked version of the Notebook.

forking a version of a notebook to your profile

Notebook versioning and diffs

Version control

If you’re used to creating many duplicate versions of notebooks with slight modifications and long file names. Look no further, Jovian.ml will be your version control for notebooks.

jovian.commit records all the versions under same notebook project. So, each change can be a version by author and collaborators which can be easily toggled in the website

jovian jupyter version control

Note

You have to own the notebook or have to be a collaborator to commit changes to the same project notebook. If not you can commit any changes made to your profile as a new notebook.

View Differences

All the versions are comparable, you can view additions, deletions made among any 2 versions of the notebook and also hide/show common part of the code.

How to view the differences?

  1. Commit different versions and visit Jovian.ml .

  2. Click on Version drop down on the right top corner.

  3. Click on Compare Versions

  4. Select any 2 versions with the use of check boxes and click on View Diff button.

jovian jupyter version diffs

There are more things to be compared, but first let’s add more content to the notebook to understand all the parameters that can be compared. Click on Next to follow through.

Attaching files and model outputs

As seen in the previous section by committing, source code and environment files are captured & uploaded. More files can be attached to the notebook such as files with helper code, output files/model checkpoints that the notebook is generating.

How to attach files?

jovian.commit(files=[], outputs=[])
attach csv, images to notebook versions

What to include in the files argument?

The type of files which is required to run the notebook.

  • Helper code (.py)

  • Some input CSVs

What to include in the artifacts argument?

Any type of outputs that the notebook is generating.

  • Saved model or weights (.h5, .pkl, .pth)

  • Outputs, Submission CSVs

  • Images outputs

Where to search for the files after committing?

All the attached files are listed under Files Tab.

Files can be:

  1. Renamed

  2. Downloaded

  3. Deleted

  4. View Raw

  5. Uploaded

Tracking Datasets, Hyperparameters and Metrics

Spreadsheets is one of the ways to track information & results of multiple ML experiments. However, using spreadsheets can be tiresome and non-intuitive without the context of the code.

Jovian.ml makes its easy for anyone to track information about datasets, hyperparameters and metrics which are associated with each version of the your experiment in notebooks. Its also displays these information version-by-version of your notebook under single UI.

These information of a notebook are all added to Records Tab where you can toggle and view each version’s log.

Dataset

data = {
    'path': '/datasets/mnist',
    'description': '28x28 gray-scale images of handwritten digits'
}
jovian.log_dataset(data)

Hyperparameters

hyperparams = {
    'arch_name': 'cnn_1',
    'lr': .001
}
jovian.log_hyperparams(hyperparams)

Metrics

metrics = {
    'epoch': 1,
    'train_loss': .5,
    'val_loss': .3,
    'acc': .94
}
jovian.log_metrics(metrics)
jovian track datasets, hyperparameters and metrics

The input to any of these can be a python dict . You can add custom parameters that are related to your experiment and have it record values manually, or automate it to record the values of a variable in a loop. Visit this page for these logging API reference.

We have callbacks for keras and fastai to automatically record hyperparams and metrics check it out.

Reset

If you’re not satisfied with some experiment and want to discard the current recorded logs before a commit. Use

jovian.reset()

Click Next to look at how to compare all of these information of all the versions.

Comparing and Analyzing experiments

Once you have more than one versions of a notebook, you will be able to use Compare Versions present in the Version dropdown on the top right corner.

Here you can observe all types of information about all of your versions.

  • Title

  • Time of Creation

  • Author

  • All the parameters logged under dataset.

  • All the parameters logged under hyperparameters.

  • All the parameters logged under metrics.

  • Notes (for author and collaborators add extra notes)

notebooks compare versions

Sort

You can sort any column or a sub-column (For ex: accuracy or any other metric, date of creation etc.) by clicking on the column header.

sort tracked metrics

Show, Hide and Reorder columns

You can create a custom view to analyse & compare your choice of parameters. Click on Configure button and then tick on the checkboxes to create a customized view. Click and drag the elements to reorder them based on your preference.

reorder results

Add notes

You can add notes to summarize the experiment for reference or for collaborators to refer to.

add notes to notebooks versions

View Diff between specific versions

Select any of the 2 versions by ticking the checkbox next to each version-row of the compare table which can be seen when you hover over any row. Click on View Diff button to view the additions and deletion made.

notebook version diffs

Archive/Delete versions

Select version/versions by ticking the checkbox of the row/rows. This enables both Archive and Delete ready for the respective actions.

archive and delete notebook versions

Filter

By default all the archived versions are hidden, you can display them by enabling Show Archived in Filter dropdown.

Filter results

Collaborating on Jovian projects

Jovian.ml allows you to add collaborators to work with you on a ML Project.

How to add collaborators?

Click on Share button of the notebook and add them by their username or email id registered with Jovian.ml (you can add a non jovian user email id as well to send an invite).

Collabarators with jupyter notebooks

This will allow the contributors to be able to commit changes to the same notebook project. The experiments by all the collaborators will also show up in the compare table tab.

Comment on individual code cells

Users can comment on any code cells individually and maintain that thread to have specific discussion about a part of the source code with context.

notebook cell comments

Maintain public, secret and private notebooks

You can find the option to Public, Secret and Private in the settings for each notebook.

  • Public : These notebooks are visible on your public profile and accessible to all.

  • Secret : These notebooks are hidden from your public profile but anyone with the link can access the notebook.

  • Private : These notebooks are also hidden from your public profile and are only accessible to the owner and collaborators.

private jupyter notebooks

Note that Private and Secret notebooks will still be visible when you’re viewing your own profile. To hide a notebook from your own profile you can archive it.

Embed Jupyter Notebooks with Jovian.ml

If you’re a blogger who takes screen snips from your Jupyter Notebooks to attach to your blog or want to showcase your wonderful notebooks on a website and wondering how to embed one. We have heard your worries and are here with this feature, any notebook on Jovian.ml is embeddable.

We got you covered if you want to embed any of the following.

  • Markdown cell

  • Code cell with output

  • Code cell without output

  • Just the output cell

  • or Whole Notebook

Live Demo

Before seeing how to to embed, have a preview of the embed right here.Below we have embedded a Jupyter notebook in our docs page, using iframe. You can interact with the notebook like copy the source code of a cell, copy a image output, scroll each cells etc.


Open up Embed modal

Commit a notebook or visit a uploaded notebook on Jovian.ml

Click on Embed button

This is ideal if you need embed the whole notebook

Embed Jovian Notebook

OR

Click on Embed icon on any cell

This is ideal when you need to embed a specific cell

Embed jovian notebook cell

Customize options and preview

Go ahead if u need more customization like only output cell and preview the embed below.

Embed notebooks topions and preview

Copy and Embed

Copy iframe code and add it to a website

If you’re building a profile website to showcase your projects or academic institution/community/meetup website making a resources page this is right for you.

Just copy and paste the iframe code in the website’s code, here is a example. Click on the image to visit the a example Github Page where the whole notebook is embedded.

notebook embed website example

Slack Notifications

Get notifications from your training experiment and stay updated with all the milestones of your code. No more watching the progress bar of your fit function to keep track of your model training. Use the same integration to get notification about other activities on Jovian.

Connect to a Slack Workspace

Visit Jovian.ml and click on the Connect Slack. You’ll be redirected to Slack Webpage.

docs images

Choose a workspace from the top right corner and a channel to integrate our Slack app. By clicking on Allow, integration will be completed and will get a acknowledgement on the selected channel, this is where you’ll be getting all your notifications.

Important

We suggest you to create your own Slack Workspace so that you won’t spam with notifications on a public workspace. Or you can choose your DM instead if you don’t want to create a new workspace.

docs images

Send Notifications from your script

This will be helpful to get updates on while training a model. You can send any python dict or string, it can be when some milestones are reached or information about the metrics(accuracy, loss …).

docs images

We have this integrated to our callbacks to get automated notifications about the metrics, check out Callbacks Section.

For API documentation check out Jovian Slack Notify

Integration Preferences

You can customize on what notifications you get to your Slack. To update the preferences visit Jovian.ml Settings or you go to your Profile Dropdown on the top right corner and click on Settings.

docs images

Adding Topics to your Notebooks

Jovian allows you to add topics to your notebooks. Adding topics to your notebooks helps other people find and contribute to your projects easily. You can add topics related to your project’s intended purpose, subject area, frameworks/languages used, or other important qualities that you find useful.

About Topics

With topics, you can explore notebooks in a particular subject area, find projects to contribute to, discover new solutions to a specific problem, or simply explore the frameworks that you love in action. Topics appear on the main page of a notebook. You can click a topic name to see related list of other notebooks tagged with that topic.

Topics Box

To browse the most used topics, go to https://jovian.ml/explore.

How to add Topics in your notebooks?

1. Click on Add Topics button in the Notebook page.

Add Topics button in Notebook landing page

2. Type the topic you want to add to your notebook, then type a space. Only lowercase letters, digits and hyphens are allowed in a topic name.

Type/add/modify topics

3. After you’re done adding topics, click Save.

Save topics

Important

Collaborators in your project will also be able to Add/Modify topics.

Explore Topics

Public, secret and private notebooks can have topics, although you will only see private/secret notebooks that you have access to in topic search results.

To explore more notebooks tagged with a topic, simply click on a topic badge that appears in the Notebook page.

You can search for notebooks that are associated with a particular topic. You can also search for a list of topics on Jovian. Change the URL on topics page with a comma separated list of topics.

Examples:

Topics Page

Topics Page

Git Integration

jovian.commit automatically performs git commit if the current notebook/script is in a git repository, as git_commit is True by default and works only inside a git repository.

Use git_message parameter to give a different commit message to git, else it will take jovian’s commit message by default.

jovian.commit(message="jovian version commit message",
              git_message="git commit message")
git commit from notebook

Jovian also generates a link to the git commit associated to each jovian commit versions and is accessible with a button on the notebook linking to github/gitlab.

git button on jovian

Important

Jovian does not perform git push, so if the asscociated link is not available then you’ll have push your repo.

Jovian Pro

Schedule a meeting for a Demo and discussion with Aakash NS (CEO, Jovian.ml).

Please contact us at hello@jovian.ml

Commit

Log Dataset, Hyperparams & Metrics

Send Notifications to Slack

CLI Commands

CLI - Command line interface, is a text-based interface to interact with your system. On Mac/Linux based OS you’ll have terminal application where these commands can be executed, on windows it’ll be named as command prompt or conda prompt can be used if Anaconda has been installed.

These commands requires installation of jovian library, if you’re working with pip/conda virtual environments make sure you activate the environment where the jovian library is installed.

These commands ensure that you can directly interact with Jovian from CLI.

Fastai Callback

Keras Callback

oEmbed Endpoint for embedding Jovian Notebooks

oEmbed is an open standard to easily embed content from oEmbed providers into your site. You can use the oEmbed standard for embedding Jovian notebooks into your website, have a look at oEmbed.com.

API Endpoint URL

You can use our API endpoint to request the embed code for public Notebooks, all responses are in json format. Replace {notebook-url} by your Jovian Notebook URL, or Jovian Viewer URL, or any raw .ipynb file URL:

Parameters:

  • url (String, required): The URL of the notebook or Jovian Viewer URL.

  • cellId (Integer, optional): Index of the cell of the notebook for cell-level embeds. If no cellId id present, whole notebook gets embedded.

  • maxwidth (Integer, optional): The maximum width of the embedded resource (optional). Note that the maxheight parameter is not supported. This is because the embed code is responsive and its height varies depending on its width.

Example URLs:

Response:

{
  "title": "Jovian Viewer",
  "provider_name": "Jovian",
  "provider_url": "https://jovian.ml",
  "author_name": "Jovian ML",
  "version": "1.0",
  "type": "rich",
  "author_url": "https://github.com/JovianML",
  "height": 800,
  "width": 800,
  "html": "<iframe src='https://jovian.ml/embed?url=https%3A//jvn.storage.googleapis.com/gists/aakashns/5bc23520933b4cc187cfe18e5dd7e2ed/raw/901a9d2508bd441dbf06954c5f46bf58/movielens-fastai.ipynb' title='Jovian Viewer' height=800 width=800 frameborder=0 allowfullscreen></iframe>"
}

Jovian: Libraries and Integrations

Jovian integrates seamlessly with your favorite tools and libraries. Automate your workflow and boost your productivity.

Jupyter Notebook Extension

Now you can commit your Jupyter Notebook to Jovian with just One Click. Make sure you’ve completed the Installation before reading further.

Using Jovian Jupyter Extension

jupyter extension toolbar button

Once you have successfully installed jovian, a new button Commit will appear on the tool bar. When using Commit button for first time you’ll be asked to provide an API key.

jovian api key prompt

You can get the API key at Jovian. Once you log in, just click on API key button, and the key will be copied to the clipboard.

jovian api key copy button

Valid API key

If the key is valid you will be notified with the following alert.

valid api key prompt

Error with API key

If the entered API key is invalid you will get following error.

api key error prompt

Successful Commit

Once the API key has been validated, you can start committing to Jovian by clicking Commit button. Once the Notebook has been committed successfully you will get the confirmation message with the link where the Jupyter Notebook has been uploaded to, you can use the copy button to get the link to the share the notebook.

jovian commit success prompt

Commit with more options

This makes use of jovian.commit’s parameters to enable the user to commit with preferences like private notebook, new notebook project, to add outputs and files …..

Step 1: click the dropdown menu

jovian dropdown menu

Step 2: choose commit with options

jovian commit options jupyter extension

Note: By default the parameters are derived from jovian.commit, changes to any parameter persists after commit.

Step 3: Click on Commit to commit the notebook with following options.

jupyter extension commit options prompt

Enable or Disable the extension

By default, the Jovian Jupyter Notebook Extension is enabled to the environment where jovian is installed.

You can also disable the extension by running the following command.

$ jovian disable-extension

To Enable the Notebook Extension, when you have manually disabled it.

$ jovian enable-extension

Jupyter Lab Extension

Now you can commit your Jupyter Notebook to Jovian with just One Click. Make sure you’ve completed the Installation before reading further.

Using Jovian Jupyter Lab Extension

jupyter extension toolbar button

Once you have successfully installed jovian, a new button Commit will appear on the tool bar. When using Commit button for first time you’ll be asked to provide an API key.

jovian api key prompt

You can get the API key at Jovian. Once you log in, just click on API key button, and the key will be copied to the clipboard.

jovian api key copy button

Valid API key

If the key is valid you will be notified with the following alert.

valid api key prompt

Error with API key

If the entered API key is invalid you will get following error.

api key error prompt

Successful Commit

Once the API key has been validated, you can start committing to Jovian by clicking Commit button. Once the Notebook has been committed successfully you will get the confirmation message with the link where the Jupyter Notebook has been uploaded to, you can click the link to your Notebook in Jovian.

jovian commit success prompt

Commit with more options

This makes use of jovian.commit’s parameters to enable the user to commit with preferences like private notebook, new notebook project, to add outputs and files …..

Step 1: click the dropdown menu

jovian dropdown menu

Step 2: choose commit with options

jovian commit options jupyter extension

Note: By default the parameters are derived from jovian.commit, changes to any parameter persists after commit.

Step 3: Click on Commit to commit the notebook with following options.

jupyter extension commit options prompt

Enable or Disable the extension from CLI

You can also disable the extension by running the following command.

$ jupyter labextension disable jovian-jupyterlab

To Enable the Notebook Extension, when you have manually disabled it.

$ jupyter labextension enable jovian-jupyterlab

Github Integration

jovian.commit automatically performs git commit if the current notebook/script is in a git repository, as git_commit is True by default and works only inside a git repository.

Use git_message parameter to give a different commit message to git, else it will take jovian’s commit message by default.

jovian.commit(message="jovian version commit message",
              git_message="git commit message")
git commit from notebook

Jovian also generates a link to the git commit associated to each jovian commit versions and is accessible with a button on the notebook linking to github/gitlab.

git button on jovian

Important

Jovian does not perform git push, so if the asscociated link is not available then you’ll have push your repo.

Keras Integration

Step 1 Import

import jovian
from jovian.callbacks.keras import JovianKerasCallback

Step 2 Pass the callback to the fit method.

# To record logs of every epoch and to notify on slack
jvn_cb = JovianKerasCallback(arch_name='resnet18', every_epoch=True, notify=True)
model.fit(x_train, y_train, ...., callbacks=[jvn_cb])

For more details visit Keras callback API reference

keras callback log

Step 3 Perform jovian commit

jovian.commit(message="keras callback")

Step 4 View and compare experiment logs

View all the log of a certain version is the Records Tab

keras records tab

Compare the results of many expriments that you have performed. For more usage of compare details visit Compare

compare records

Fastai Integration

Step 1 Import

import jovian
from jovian.callbacks.fastai import JovianFastaiCallback

Step 2 Pass the callback to the fit method.

learn = cnn_learner(data, resnet34)
jvn_cb = JovianFastaiCallback(learn, 'res18')
learn.fit_one_cycle(5, callbacks = jvn_cb)

For more details visit Fastai callback API reference

Step 3 Perform jovian commit

jovian.commit(message="fastai callback")

Step 4 View and compare experiment logs

View all the log of a certain version is the Records Tab

keras records tab

Compare the results of many expriments that you have performed.For more usage of compare details visit Compare

compare records

VS Code Integration

jovian.commit works for VS Code Notebooks too.

jovian.commit(message="example commit", filename="lesson1-pets")

Visit commit api reference for more commit options

vs code jupyter notebook

PyCharm Integration

jovian.commit works for PyCharm notebooks too.

jovian.commit(message="pycharm commit")

Visit commit api reference for more commit options

PyCharm jupyter notebook

Important

Jupyter support is provided in PyCharm’s Professional version.

Tensorflow Integration

Page under Construction

PyTorch Integration

Page under Construction

Telegram Integration

Page under Construction

Scikit Learn Integration

Page under Construction

Xgboost Integration

Page under Construction

SciPy Integration

Page under Construction

OpenCV Integration

Page under Construction

Apache Spark Integration

Page under Construction

Anaconda Integration

Page under Construction