Octomil — serve, deploy, and observe ML models on edge devices
Project description
Octomil
On-device AI inference. Deploy, route, observe.
Install
pip install octomil-sdk
Quick Start
Serve a model locally with an OpenAI-compatible API:
octomil serve gemma-1b
curl http://localhost:8080/v1/chat/completions \
-d '{"model": "gemma-1b", "messages": [{"role": "user", "content": "Hello"}]}'
SDK Usage
from octomil import Octomil
client = Octomil(api_key="oct_...", org_id="org_123")
# Register a model
model = client.registry.ensure_model(name="sentiment", framework="pytorch")
# Gradual rollout
client.rollouts.create(model_id=model["id"], version="1.0.0", rollout_percentage=10)
# A/B test
client.experiments.create(name="v1-vs-v2", model_id=model["id"],
control_version="1.0.0", treatment_version="1.1.0")
CLI
| Command | |
|---|---|
octomil serve <model> |
Local inference server (OpenAI-compatible) |
octomil pull <model> |
Download a model |
octomil push <file> |
Upload a model |
octomil deploy <model> |
Deploy to devices |
octomil convert <file> |
Convert to CoreML / TFLite |
octomil check <file> |
Validate a model |
octomil scan <path> |
Security scan |
octomil benchmark <model> |
Latency benchmarks |
octomil login |
Authenticate |
Federated Learning (Enterprise)
Train across devices without centralizing data:
from octomil import DeviceAuthClient, FederatedClient
auth = DeviceAuthClient(base_url="https://api.octomil.com", org_id="org_123",
device_identifier="runtime-001")
await auth.bootstrap(bootstrap_bearer_token=token)
client = FederatedClient(auth_token_provider=lambda: auth.get_access_token_sync(),
org_id="org_123")
client.register()
assignment = client.get_round_assignment()
if assignment:
client.participate_in_round(round_id=assignment["round_id"],
local_train_fn=my_train_fn)
Documentation
Releasing
Releases are managed with Knope. From main:
knope release # bumps versions, generates changelog, opens a PR
# merge the PR, then:
git pull origin main
knope release-pr-merged # creates GitHub release + tag → triggers PyPI publish
Contributing
See CONTRIBUTING.md.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
octomil_sdk-2.6.0.tar.gz
(418.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
octomil_sdk-2.6.0-py3-none-any.whl
(272.6 kB
view details)
File details
Details for the file octomil_sdk-2.6.0.tar.gz.
File metadata
- Download URL: octomil_sdk-2.6.0.tar.gz
- Upload date:
- Size: 418.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adf2647017ba1d42feaa34f506c2c9b44179354ba1570dbb2e16e00a0065f4bc
|
|
| MD5 |
5e7533735c7fc731d9638630f93e9e17
|
|
| BLAKE2b-256 |
ba48d5e580c5f31cda8198e319b5779456c6280f148c74b7982ae4c8f44ceca7
|
File details
Details for the file octomil_sdk-2.6.0-py3-none-any.whl.
File metadata
- Download URL: octomil_sdk-2.6.0-py3-none-any.whl
- Upload date:
- Size: 272.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e8191be88d196eda98611e7425c0965da96bd872a32eebc992899da2189116e
|
|
| MD5 |
3f059fdb8624cd0da8ee2980feac0b97
|
|
| BLAKE2b-256 |
6cfdafbf5e0ca5779b98efd798ddcb1cafd26a372060b71e0f8bb38aeedd9229
|