Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

🚀 Airdot Deployer

Python Code style: black

Deploy your ML models in minutes, not weeks.

Detailed documentation can be found here

Airdot Deployer will automatically:

  1. Restructure your Python code (from Jupyter Notebook/local IDEs) into modules.
  2. Builds a REST API around your code.
  3. Conterize the app.
  4. Spins up the required hardware (local or K8s or cloud).
  5. Monitors for model/data drift and performance (in development)

Take your ML model from Local to Production with one-line of code

from airdot.deployer import Deployer
deployer_obj = Deployer().run(<your-ml-predictor>)

Once deployed, your model will be up and running on the intra/internet, accessible to your users. No more worrying about complex server setups or manual configuration. Airdot Deployer does all the heavy lifting for you.

curl -XPOST <url> -H 'Content-Type: application/json' -d '{"args": "some-value"}'

Whether you're a data scientist, developer, or tech enthusiast, Airdot Deployer empowers you to showcase your machine learning prowess and share your creations effortlessly.

What does Airdot Deployer supports ?

  • Local Deployment with Docker docker
  • K8s Deployment with seldon core core

Want to try Airdot ? follow setup instructions

📋 Setup Instructions

Before we get started, you'll need to have Docker, Docker Compose, and s2i installed on your machine. If you don't have these installed yet, no worries! Follow the steps below to get them set up:

Docker Install

Please visit the appropriate links to install Docker on your machine:

  • For macOS, visit here
  • For Windows, visit here
  • For Linux, visit here

S2I install

For Mac You can either follow the installation instructions for Linux (and use the darwin-amd64 link) or you can just install source-to-image with Homebrew:

$ brew install source-to-image

For Linux just run following command

curl -s https://api.github.com/repos/openshift/source-to-image/releases/latest| grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4  | wget -qi -

For Windows please follow instruction here

💻 Airdot Deployer Installation

Install the Airdot Deployer package using pip:

pip install "git+https://github.com/airdot-io/airdot-deployer.git@main#egg=airdot"

or

pip install airdot

🎯 Let's try out

Local Deployments

Run following in terminal to setup minio and redis on your machine

docker network create minio-network && wget  https://raw.githubusercontent.com/airdot-io/airdot-deployer/main/docker-compose.yaml && docker-compose -p airdot up

Train your model

from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from airdot.deployer import Deployer
from sklearn import datasets
import pandas as pd
import numpy as np

iris = datasets.load_iris()
iris = pd.DataFrame(
    data= np.c_[iris['data'], iris['target']],
    columns= iris['feature_names'] + ['target']
)
X = iris.drop(['target'], axis=1)
X = X.to_numpy()[:, (2,3)]
y = iris['target']
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.5, random_state=42)
log_reg = LogisticRegression()
log_reg.fit(X_train,y_train)

Test your model

def predict(value):
    return log_reg.predict(value)

Deploy in one step 🤯

deployer_obj = Deployer().run(predict)

Use your deployed Model

curl -XPOST http://127.0.0.1:8000 -H 'Content-Type: application/json' -d '{"value": [[4.7, 1.2]]}'

Want to stop your deployment

deployer.stop('predict') # to stop container

Deployment on k8s using seldon-core deployment

Note - This method will use your current cluster and uses seldon-core to deploy

from airdot import Deployer
import pandas as pd

# this is using default seldon-deployment configuration.
config = {
        'deployment_type':'seldon',
        'bucket_type':'minio',
        'image_uri':'<registry>/get_value_data:latest'
        }
deployer = Deployer(deployment_configuration=config) 


df2 = pd.DataFrame(data=[[10,20],[10,40]], columns=['1', '2'])
def get_value_data(cl_idx='1'):
    return df2[cl_idx].values.tolist()

deployer.run(get_value_data) 

you can also deploy using seldon custom configuration

from airdot import Deployer
import pandas as pd

# this is using default seldon-deployment configuration.
config = {
        'deployment_type':'seldon',
        'bucket_type':'minio',
        'image_uri':'<registry>/get_value_data:latest',
        'seldon_configuration': '' # your custom seldon configuration
        }
deployer = Deployer(deployment_configuration=config) 


df2 = pd.DataFrame(data=[[10,20],[10,40]], columns=['1', '2'])
def get_value_data(cl_idx='1'):
    return df2[cl_idx].values.tolist()

deployer.run(get_value_data) 

Release files for airdot 0.6.0b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for airdot 0.6.0b0
File Size Uploaded
airdot-0.6.0b0.tar.gz 27.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for airdot 0.6.0b0
File Interpreter ABI Platform
airdot-0.6.0b0-py3-none-any.whl Python 3 none any Details

Total release size: 58.5 kB

Release files / airdot-0.6.0b0.tar.gz

Download URL airdot-0.6.0b0.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5d6f0e4b4c2865b000928b9a656efd4241338f24e40665395a195da1544b8ced
BLAKE2b-256 checksum
How to use checksums
79a65a8fde932e4e4f7b8e885be3fd468bf6e5474d018f9d4fcd75141323984d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16

Release files / airdot-0.6.0b0-py3-none-any.whl

Download URL airdot-0.6.0b0-py3-none-any.whl
Size 31.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
948035140799944c3b7ff46da7b0f51b6f359a127d782ea856953ea965b7347a
BLAKE2b-256 checksum
How to use checksums
f6fe50be1ac6a50a9308c7b2b381c4b60b486ff8359056ccee4129a32f53a7df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.16
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page