Jovian: The platform for all your Data Science projects

Jovian logo

Jovian 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 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.ai , 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 (or Jovian Pro) account.

jovian api key button

Here’s what jovian.commit does:

  • It saves and uploads the Jupyter notebook to your Jovian (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.

Import notebooks from URL

Create a New Notebook imported from any hosted URL which points to a .ipynb file (Github/Gitlab/….) new notebook dropdown

Example: Retrieving raw URL from a notebook uploaded to Github. raw url from github

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 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 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 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

Run notebooks online

Execute notebooks on your browser without the need of local setup. Run any notebook uploaded to Jovian with just a click.

  • Binder [CPU only instances]

  • Colab [GPU or TPU instances]

  • Kaggle [GPU or TPU instances]

Run jovian notebooks online

Run on Binder

  • Click Run on Binder

  • You may have to wait few minutes while it installs initial dependencies.

Run on Binder
  • Notebooks with conda dependency present will automatically install them to the instance. It may take few more minutes while installing project related dependencies.

  • Upon successful launch, you can expect similar notebook instance ready for execution.

Run on Binder

Important

Please use the service judiciously, quit when execution is completed. These instances will shut down with inactivity, please use jovian.commit to save your progress.

Run on Colab

  • Run GPU/TPU instances on browsers with integration of Jovian and Google Drive.

  • Step 1: Create a jovian notebook or use a existing project (Required)

    • To create a notebook click on New Notebook on your profile. You can also use the “Upload Notebook” option or “Duplicate” and existing notebook. New Notebook

  • Step 2: Click Run on Colab

    • Once you add new notebook or visit a existing notebook, you’ll be able to run it. Click Run on Colab Run jovian notebooks online

  • Step 3: Integrate Google Drive to Jovian

    • A modal would pop up, choose Authorize and Run on Colab(only this process supports jovian.commit), this would take to you to a page when your integrate Google Drive with Jovian only for the first time. Authorize with the required Google Email ID.

      Authorize drive
    • All the notebooks that you run will be saved on your drive under the email id that you authorize and the same file is picked up while committing back.

    • After successful authorization you’ll be redirected to the Colab page which is private and only the authorized email id has the permissions to view/edit it.

  • Step 4: Executing cells on colab

    • We have embedded first cell which has all the necessities required for jovian.commit to work including installation. Please retain this cell and run it. Colab interface

    • You can carry forward with other cells after this

  • Step 5: jovian.commit

jovian.commit(project="python-pandas") # project parameter is required(existing or new)

What to do if you already have Colab notebook and want to commit it ?

  • Currently we don’t have support for this, but there is a way to do it.

  • Step 1: Download .ipynb from Colab

    • Download notebook from colab
  • Step 2: Upload it to Jovian from Webapp

    • Upload notebook to jovian That's it. Once you have it on Jovian, the first flow can be used.

Why jovian.commit on Local Jupyter, Binder, Kaggle is simpler than Colab?

  • Colab uses their own version of notebook and have restrictions on file usage, so we need a integration with Google Drive to pick the file.

  • All Colab notebooks are files under your Google Drive

Is it okay to give file permissions to Jovian?

  • Yes, we only ask for permission to write new files and have access to edit the files that we create. So we don’t have access to any other files on your Google Drive.

  • All the files that we create are the notebooks that you do Run on Colab

  • We have a parent directory named Jovian you can delete this if you’re running out of space. Or delete more specifically inside this directly, you’ll find folders username/notebook-project

Run on Kaggle

  • Click Run on Kaggle and you will be redirected to Kaggle

  • Here you can choose if you want run a CPU only/GPU/TPU instance, then click on Create. Run on Kaggle

  • Make sure to you have internet toggle switched On and in required hardware accelerator. All these information is available on the right tab. Run on Kaggle - interface

Important

Internet and GPU instance options are only available after a mobile number verification.

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 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 .

  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 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 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 (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

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 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

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 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 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.ai/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.

Submit assignments directly from jovian library

Commit and submit assignments for Courses hosted on Jovian directly from Jupyter notebook. All you need is an assignment code (available in the respective assignment pages) that you need pass to jovian.submit.

Example:

import jovian

jovian.submit(assignment="zero-to-pandas-a1")

Incase you just need to submit a notebook already uploaded to Jovian, you can pass the notebook_url to just make the submission without committing the current notebook.

Example:

import jovian

jovian.submit(assignment="zero-to-pandas-a1",
              notebook_url="https://jovian.ai/PrajwalPrashanth/assignment")

Submit from Kaggle Kernels

jovian.submit works well for Local Jupyter notebooks/Colab/Binder, but it is not completely supported for Kaggle Kernels. Where you would have to do jovian.commit to commit and then do jovian.submit with the URL from jovian.commit.

Example:

import jovian

jovian.commit(....) # returns and prints the URL of the committed notebook
jovian.submit(assignment="zero-to-pandas-a1",
              notebook_url=<notebook_url_taken_from_commit>)

Jovian Pro

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

Please contact us at hello@jovian.ai

Commit

jovian.commit(message=None, files=[], outputs=[], environment='auto', privacy='auto', filename=None, project=None, new_project=None, git_commit=False, git_message='auto', **kwargs)[source]

Uploads the current file (Jupyter notebook or python script) to Jovian

Saves the checkpoint of the notebook, captures the required dependencies from the python environment and uploads the notebook, env file, additional files like scripts, csv etc. to Jovian . Capturing the python environment ensures that the notebook can be reproduced.

Parameters
  • message (string, optional) – A short message to be used as the title for this version.

  • files (array, optional) – Any additional scripts(.py files), CSVs etc. that are required to run the notebook. These will be available in the files tab of the project page on Jovian

  • outputs (array, optional) – Any outputs files or artifacts generated from the modeling processing. This can include model weights/checkpoints, generated CSVs, output images etc.

  • environment (string, optional) – The type of Python environment to be captured. Allowed options are ‘conda’ , ‘pip’, ‘auto’ (for automatic detection) and None (to skip environment capture).

  • privacy (bool, optional) –

    Privacy level of the project (if a new one is being created).

    • ’auto’ - use account level settings. Defaults to ‘public’

    • ’public’ - visible on profile and publicly accessible/searchable

    • ’secret’ - not on profile only accessible via the direct link

    • ’private’ - only for the accessible to owner and collaborators

    This argument has no effect on existing project. Change the privacy settings of a existing notebook on the webapp.

  • filename (string, optional) – The filename of the current Jupyter notebook or Python script. This is detected automatically in most cases, but in certain environments like Jupyter Lab or password protected notebooks, the detection may fail and the filename needs to be provided using this argument.

  • project (string, optional) – Name of the Jovian project to which the current notebook/file should be committed. Format: ‘username/title’ e.g. ‘aakashns/jovian-example’ or ‘jovian-example’ (username of current user inferred automatically). If the project does not exist, a new one is created. If it exists, the current notebook is added as a new version to the existing project, if you are a owner/collaborator. If left empty, project name is picked up from the .jovianrc file in the current directory, or a new project is created using the filename as the project name.

  • new_project (bool, optional) – Whether to create a new project or update the existing one. Allowed option are False (use the existing project, if a .jovianrc file exists, if available), True (create a new project)

  • git_commit (bool, optional) – If True, also performs a Git commit and records the commit hash. This is applicable only when the notebook is inside a Git repository.

  • git_message (string, optional) – Commit message for git. If not provided, it uses the message argument

Attention

Pass notebook’s name to filename argument, in certain environments like Jupyter Lab and password protected notebooks sometimes it may fail to detect notebook automatically.

Log Dataset, Hyperparams & Metrics

jovian.log_dataset(data_dict=None, verbose=True, **data_args)[source]

Record dataset details for the current experiment

Parameters
  • data_dict (dict, optional) – A python dict to be recorded as dataset.

  • verbose (bool, optional) – By default it prints the acknowledgement, you can remove this by setting the argument to False.

  • **data_args (optional) – Instead of passing a dictionary, you can also pass each individual key-value pair as a argument (see example below)

Example
import jovian

path = 'data/mnist'
description = '28x28 images of handwritten digits (in grayscale)'

jovian.log_dataset(path=path, description=description)
# or
jovian.log_dataset({ 'path': path, 'description': description })
jovian.log_hyperparams(data_dict=None, verbose=True, **data_args)[source]

Record hyperparameters for the current experiment

Parameters
  • data_dict (dict, optional) – A python dict to be recorded as hyperparmeters.

  • verbose (bool, optional) – By default it prints the acknowledgement, you can remove this by setting the argument to False.

  • **data_args (optional) – Instead of passing a dictionary, you can also pass each individual key-value pair as a argument (see example below)

Example
import jovian
jovian.log_hyperparams(arch='cnn', lr=0.001)
# or
jovian.log_hyperparams({ 'arch': 'cnn', 'lr': 0.001 })
jovian.log_metrics(data_dict=None, verbose=True, **data_args)[source]

Record metrics for the current experiment

Parameters
  • data_dict (dict, optional) – A python dict to be recorded as metrics.

  • verbose (bool, optional) – By default it prints the acknowledgement, you can remove this by setting the argument to False.

  • **data_args (any, optional) – Instead of passing a dictionary, you can also pass each individual key-value pair as a argument (see example below)

Example
import jovian
jovian.log_metrics(epochs=1, train_loss=0.5,
                   val_loss=0.3, val_accuracy=0.9)
# or
jovian.log_metrics({ 'epochs': 1, 'train_loss': 0.5 })
jovian.reset(*record_types)[source]

Reset the tracked hyperparameters, metrics or dataset (for a fresh experiment)

Parameters

*record_types (strings, optional) – By default, resets all type of records. To reset specific type of records, pass arguments metrics, hyperparams, dataset

Example
import jovian
jovian.reset('hyperparams', 'metrics')

Send Notifications to Slack

jovian.notify(data, verbose=True, safe=False)[source]

Sends the data to the Slack workspace connected with your Jovian account.

Parameters
  • data (dict|string) – A dict or string to be pushed to Slack

  • verbose (bool, optional) – By default it prints the acknowledgement, you can remove this by setting the argument to False.

  • safe (bool, optional) – To avoid raising ApiError exception. Defaults to False.

Example
import jovian

data = "Hello from the Integration!"
jovian.notify(data)

Important

This feature requires for your Jovian account to be connected to a Slack workspace, visit Jovian Integrations to integrate them and to control the type of notifications.

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.

clone

Clone a notebook hosted on Jovian:

$ jovian clone aakashns/jovian-tutorial

Or clone a specific version of notebook:

$ jovian clone aakashns/jovian-tutorial -v 10

jovian clone <username/title>

Options

-v, --version <version>

Version number

--no-outputs

Exclude output files

--overwrite

Overwrite existing project

Arguments

<username/title>

Required argument

install

Install packages from environment file:

$ jovian install

or, to specify environment name:

$ jovian install -n my_env

jovian install

Options

-n, --name <name>

Name of conda env

activate

Activate conda environment from environment file.

jovian activate

pull

Fetch the new version of notebook hosted on Jovian(inside a cloned directory):

$ jovian pull

Or fetch a specific version of a specific notebook:

$ jovian pull -n aakashns/jovian-tutorial -v 10

jovian pull

Options

-n, --notebook <notebook>

Notebook project (format: username/title)

-v, --version <version>

Version number

configure

Configure Jovian for Pro users.

jovian configure

set-project

Associate notebook (filename.ipynb) to Jovian project (username/title)

$ jovian set-project my_notebook.ipynb danb/keras-example

This will create or update the .jovianrc file in the current directory to ensure that commits inside the Jupyter notebook “my_notebook.ipynb” add new versions to the project danb/keras-example

jovian set-project NOTEBOOK PROJECT

Arguments

NOTEBOOK

Required argument

PROJECT

Required argument

commit

Create a new notebook on Jovian

$ jovian commit my_notebook.ipynb

jovian commit NOTEBOOK

Arguments

NOTEBOOK

Required argument

reset

Reset Jovian config.

jovian reset

add-slack

Connect slack to get updates.

jovian add-slack

enable-extension

Enable Jovian’s Jupyter notebook extension.

jovian enable-extension

disable-extension

Disable Jovian’s Jupyter notebook extension.

jovian disable-extension

version

Print installed Jovian library version.

jovian version

help

Print this help message.

jovian help

Fastai Callback

class jovian.callbacks.fastai.JovianFastaiCallback(learn: fastai.basic_train.Learner, arch_name=None, reset_tracking=True)[source]

Fastai callback to automatically log hyperparameters and metrics.

Parameters
  • learn (Learner) – A learner object reference of your current model.

  • arch_name (string) – A name for the model you’re training.

Example
from jovian.callbacks.fastai import JovianFastaiCallback

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

Tutorial

Visit this for a detailed example on using the fastai callback, also visit the Records tab to see all the logs of that notebook logged by the callback.

Keras Callback

class jovian.callbacks.keras.JovianKerasCallback(reset_tracking=True, arch_name='', every_epoch=False, notify=False)[source]

Keras Callback to log hyperparameters and metrics during model training.

Parameters
  • reset_tracking (string, optional) – Will clear previously tracked hyperparameters & metrics, and start a fresh recording. Defaults to True.

  • arch_name (string, optional) – A name for the model you’re training.

  • every_epoch (bool, optional) – Whether to record losses & metrics for every epoch or just the final loss & metric. Defaults to False.

  • notify (bool, optional) – Whether to send notification on slack when the training ends. Defaults to False.

Example
from jovian.callbacks.keras import JovianKerasCallback

# 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])

Tutorial

Visit this for a detailed example on using the fastai callback, also visit the Records tab to see all the logs of that notebook logged by the 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.ai",
  "author_name": "Jovian ML",
  "version": "1.0",
  "type": "rich",
  "author_url": "https://github.com/JovianML",
  "height": 800,
  "width": 800,
  "html": "<iframe src='https://jovian.ai/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