Practice, Observe, and Deploy Your Fashions: Neptune + Modelbit Integration


We’re excited to announce that Neptune and Modelbit have partnered to launch an integration to allow higher ML mannequin deployment and experiment monitoring. Knowledge scientists and machine studying engineers can use the mixing to prepare and deploy machine studying fashions in Modelbit whereas logging and visualizing coaching progress in Neptune.

If you’re not already acquainted, Neptune is a light-weight experiment tracker for MLOps. It provides a single place to trace, evaluate, retailer, and collaborate on experiments and fashions. 

Neptune's UI
Neptune’s UI

Modelbit is a machine studying platform that makes deploying customized ML fashions to REST Endpoints so simple as calling “modelbit.deploy()” in any knowledge science pocket book or Python editor.

Modelbit's UI
Modelbit’s UI

On this publish, we’ll cowl the next subjects:

  • Organising the mixing between Modelbit and Neptune
  • Making a training job in Modelbit that:
    • Logs the mannequin’s hyperparameters and accuracy to Neptune
    • Deploys the mannequin to a REST endpoint.

In case you wish to leap proper into establishing the mixing, you possibly can follow the instructions in Modelbit’s documentation.

Organising the mixing

To get began, you’ll must create free accounts with each Modelbit and Neptune:

Modelbit integrates with Neptune utilizing your Neptune API token so you possibly can log coaching metadata and mannequin efficiency to your Neptune tasks.

So as to add your Neptune API token to Modelbit, go to the Integrations tab of Settings in your Modelbit account, click on the “Neptune” tile, and add your “NEPTUNE_API_TOKEN”. This token might be obtainable in your coaching jobs’ environments as an setting variable so you possibly can robotically authenticate with Neptune.

Making a Modelbit coaching job that makes use of Neptune

We’ll make a coaching job to coach a mannequin to foretell flower sorts, utilizing the Scikit Learn Iris dataset. We’ll log the mannequin’s hyperparameters and accuracy to Neptune after which deploy the mannequin to a REST endpoint.

Our mannequin may be very easy and depends on two options to foretell the flower sort.

Setup

First, import “modelbit” and “neptune” and authenticate your pocket book with Modelbit:

In case your “NEPTUNE_API_TOKEN” isn’t already in your pocket book’s setting, add it:

Creating the coaching job

We’ll create a perform to encapsulate our coaching logic. On the prime of the perform we name “run = neptune.init(…)” to begin a run and report our hyperparameters with “run[…]”. Be sure you change the “venture=” parameter in “neptune.init_run”.

Then we create and match the mannequin, logging the mannequin’s accuracy to Neptune and saving the mannequin with “mb.add_model”.

Deploy and run the coaching job

We will now deploy our coaching perform to Modelbit with “mb.add_job”:

Click on the “View in Modelbit” button, then click on “Run Now”. As soon as the job completes, head over to your Neptune venture to see that the job logged a brand new run!

Deployments dashboard in Modelbit
Deployments dashboard in Modelbit

Create a REST endpoint

Lastly, we’ll deploy our flower predictor mannequin to a REST endpoint. We’ll make an inference perform that accepts two enter options and calls the mannequin we educated, returning the expected flower sort:

Deploy the inference perform to create a REST endpoint:

Our flower predicting mannequin is stay as a REST endpoint, and each time we retrain it the hyperparameters and accuracy are logged to Neptune for cautious monitoring.

Hyperparameters and metrics tracked in Neptune app
Hyperparameters and metrics tracked within the Neptune app

Subsequent steps

Each Neptune and Modelbit share a imaginative and prescient of empowering ML groups to confidently ship impactful ML fashions into manufacturing. With this integration, machine studying engineers and knowledge scientists can prepare and deploy machine studying fashions in Modelbit whereas logging and visualizing coaching progress in Neptune.

As a reminder, each Neptune and Modelbit have choices to get began free of charge. Give the brand new integration a strive, and tell us what you assume!

Was the article helpful?

Thanks to your suggestions!

Discover extra content material subjects:

Leave a Reply

Your email address will not be published. Required fields are marked *