Skip to main content

Getting started

Modelbit helps you deploy ML models from your Python notebooks or git to Snowflake, Redshift, and REST. Create an account and then:

Install the Modelbit package via pip:

pip install modelbit

Once installed, log in to Modelbit from a notebook environment like Jupyter:

import modelbit
mb = modelbit.login()

Running the code above will display an authentication link. Click the link to connect your notebook to Modelbit, then return to your notebook.

Create your first deployment‚Äč

Modelbit deployments are Python functions. The following example creates a linear regression model that's trained to double numbers, wraps it in a function with input checking, and then deploys it:

from sklearn import linear_model
lm = linear_model.LinearRegression()[[1], [2], [3]], [2, 4, 6])

def example_doubler(half: int) -> int:
if type(half) is not int:
return None
return round(lm.predict([[half]])[0])


Running the code above will display a link to the deployment's overview page including logs and sample code showing how to call the deployment.

Next, the Deploying models section will help you improve your deployment and use it within your data warehouse.