Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dispor

Dispor is an experimental tracking and deployment platform that containerizes machine learning models into live microservices instantly. It combines model registry features with immediate inference endpoints, simplifying the transition from training to serving.

Core Features

  • Instant Deployment: Models are containerized and served as API endpoints upon deployment.
  • Python SDK: Simple configuration and deployment interface.
  • Go Backend: High-performance API gateway and Docker orchestration.
  • React UI: Dashboard for managing models, viewing version history, and testing inference.
  • Hot-Loading: Automatic container management for efficient resource usage.

Installation

Install the Python SDK directly from the repository:

pip install git+https://github.com/deepto98/dispor.git#subdirectory=sdk

Usage

1. Configure the Client

Initialize the client with your backend host and API key.

import dispor
from sklearn.linear_model import LinearRegression

dispor.config = {
    "api_key": "your-api-key",
    "host": "http://localhost:8080"
}

2. Train and Deploy

Train your model as usual, then deploy it with a single function call.

# Train a standard scikit-learn model
model = LinearRegression()
model.fit(X_train, y_train)

# Deploy to Dispor
run_id = dispor.deploy(
    model=model,
    name="house-price-predictor",
    version_desc="v1 with robust scaling",
    input_example=[{"SquareFootage": 2500, "NumBedrooms": 3}]
)

print(f"Model deployed with Run ID: {run_id}")

3. Inference

Once deployed, the model is available as a REST endpoint. You can query it via the dashboard or programmatically.

curl -X POST http://localhost:8080/api/v1/predict/<run_id> \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '[{"SquareFootage": 3000, "NumBedrooms": 4}]'

Deployment

Dispor is designed to be deployed as a single binary on a Linux VPS with Docker access.

  1. Build the frontend (npm run build).
  2. Copy frontend assets to backend/public.
  3. Build the Go backend (go build).
  4. Run the binary on a server with access to /var/run/docker.sock.

See Deployment.md for detailed instructions.

About

Instant inference for ML models

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages