Skip to main content

Octomil — serve, deploy, and observe ML models on edge devices

Project description

Octomil
On-device AI inference. Deploy, route, observe.

CI PyPI MIT


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

docs.octomil.com/sdks/python

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

MIT

Project details


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.4.0.tar.gz (410.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octomil_sdk-2.4.0-py3-none-any.whl (263.6 kB view details)

Uploaded Python 3

File details

Details for the file octomil_sdk-2.4.0.tar.gz.

File metadata

  • Download URL: octomil_sdk-2.4.0.tar.gz
  • Upload date:
  • Size: 410.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for octomil_sdk-2.4.0.tar.gz
Algorithm Hash digest
SHA256 c6093266e85a2a3fe84e4d7c7ee9a7b4403d711062216d98506c34fe0e0cebc8
MD5 7ec8bd555872419603b8913ec12680f0
BLAKE2b-256 8f6ccbacec803d85184c38eae5e9afacc2423e3dd29c3d4e944b694d50eaa104

See more details on using hashes here.

File details

Details for the file octomil_sdk-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: octomil_sdk-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 263.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for octomil_sdk-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bdc8d91c9954b5957b625e483ff0e237eebcf80cfc37b0e22283fa5dbac0305e
MD5 344e4c00eba605d58750c39e0ce2c680
BLAKE2b-256 825d55cc25a92ddb64d7ed34821f3b385dee9f8ddd5dc5866b2906a9a30a57b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page