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 coach and deploy machine studying fashions in Modelbit whereas logging and visualizing coaching progress in Neptune.
In case you are not already acquainted, Neptune is a light-weight experiment tracker for MLOps. It affords a single place to trace, examine, retailer, and collaborate on experiments and fashions.
Modelbit is a machine studying platform that makes deploying customized ML fashions to REST Endpoints so simple as calling “modelbit.deploy()” in any information science pocket book or Python editor.
![Modelbit's UI](https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Modelbit-dashboard-1.png?resize=1600%2C829&ssl=1)
On this put up, we are going to cowl the next subjects:
Organising the mixing between Modelbit and Neptune
Making a coaching job in Modelbit that:
Logs the mannequin’s hyperparameters and accuracy to Neptune
Deploys the mannequin to a REST endpoint.
In case you need to leap proper into establishing the mixing, you may observe the directions in Modelbit’s documentation.
Organising the mixing
To get began, you’ll have to create free accounts with each Modelbit and Neptune:
Modelbit integrates with Neptune utilizing your Neptune API token so you may 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 can be out there in your coaching jobs’ environments as an surroundings variable so you may 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 varieties, utilizing the Scikit Study 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 surroundings, add it:
Creating the coaching job
We’ll create a operate to encapsulate our coaching logic. On the high of the operate we name “run = neptune.init(…)” to begin a run and file our hyperparameters with “run[…]”. Make sure to 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 are able to now deploy our coaching operate 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](https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Modelbit-dashboard-2.png?resize=1273%2C827&ssl=1)
Create a REST endpoint
Lastly, we’ll deploy our flower predictor mannequin to a REST endpoint. We’ll make an inference operate that accepts two enter options and calls the mannequin we educated, returning the expected flower sort:
Deploy the inference operate to create a REST endpoint:
Our flower predicting mannequin is dwell 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](https://i0.wp.com/neptune.ai/wp-content/uploads/2023/10/Modelbit-Neptune-integration.png?resize=1600%2C765&ssl=1)
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 information scientists can practice 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 at no cost. Give the brand new integration a strive, and tell us what you suppose!