Skip to main content

Dynamic MLOps Framework with Integrated CLI for Automated ML Project Inception, Kafka-Driven Real-Time Model Monitoring, and Adaptive Canary Deployment Architectures

Project description

MLOPTIFLOW

Dynamic MLOps Framework with Integrated CLI for Automated ML Project Inception, Kafka-Driven Real-Time Model Monitoring, and Adaptive Canary Deployment Architectures

Background

We are introducing a Python framework and library with an integrated CLI, designed to streamline ML lifecycle management by automating project inception, real-time model monitoring, and adaptive canary deployment processes. The library facilitates automated project setup across various configurable ML paradigms (whether it is a Random Forest classification, XGBoost regression, T5-based time-series forecasting, encoder-only / encoder-decoder / decoder-only transformer-based NLP downstream tasks, or practically any other configurable ML paradigm) with optimized directories, subdirectories and configuration files adhering to recommended practices in ML development. The library features a plugin architecture for extensibility, allowing integration with other core components / packages, such as real-time model monitoring with anomaly detection mechanisms, adaptive canary deployment architectures, and integrated UI for monitoring and deployment control. Model monitoring is implemented using high-throughput, low-latency data streaming tool Apache Kafka. Deployed ML models act as Kafka producers, emitting real-time inference data and performance metrics serialized with Apache Avro for schema enforcement and efficiency. Model monitoring is accompanied with anomaly, data, and concept drift detection mechanisms via techniques like PSI, Isolation Forests, or LSTM auto-encoders. Adaptive canary deployment architectures and strategies are implemented specifically for ML models using Kubernetes for container orchestration and Istio as a service mesh for traffic management and routing between baseline and canary versions at granular levels. Integrated UI for monitoring and deployment control is implemented using Vanilla JavaScript and Bootstrap on the client-side, and FastAPI / LitServe on the server-side.

Installation

  1. create a new virtual environment with python ^3.11 and activate it (currently works with virtualenv, venv, and conda)

  2. install poetry:

pip install poetry
  1. install mloptiflow:
pip install mloptiflow
  1. initialize a new project and choose a name and paradigm (currently supported paradigms are: tabular-regression, tabular-classification, demo-tabular-classification)[demo ones are just a minimalistic examples of the paradigm]:
mloptiflow init <your-project-name> --paradigm=<paradigm-name>
  1. cd into your project directory:
cd <your-project-name>
  1. install dependencies:
poetry install

DEMO Test

  1. create a new virtual environment with python ^3.11 and activate it

  2. install poetry:

pip install poetry
  1. install mloptiflow:
pip install mloptiflow
  1. initialize a new project with the name demo-project and paradigm demo-tabular-classification:
mloptiflow init demo-project --paradigm=demo-tabular-classification
  1. cd into your project directory:
cd demo-project
  1. install dependencies:
poetry install
  1. run the training pipeline:
mloptiflow train start
  1. deploy (and optionally monitor) the model by running one of the following commands:
# a) deploy locally to host machine
mloptiflow deploy start --target=host-machine

# b) deploy locally to host machine and run test requests to the inference API
mloptiflow deploy start --target=host-machine --with-api-test

# c) deploy in docker container
mloptiflow deploy start --target=container

# d) deploy in docker container and run test requests to the inference API
mloptiflow deploy start --target=container --with-api-test

# e) deploy in docker container and start the monitoring
mloptiflow deploy start --target=container --kafka-monitoring

# f) deploy in docker container, run test requests to the inference API, and start the monitoring
mloptiflow deploy start --target=container --with-api-test --kafka-monitoring

Usage

  • TBA

Support

  • TBA

Roadmap

  • TBA

Contributing

  • do not push directly to the main branch, open MR instead
  • after implementing and before pushing, run:
poetry run python scripts/dev.py lint
poetry run python scripts/dev.py format
poetry run python scripts/dev.py fix
  • after implementing and before pushing, implement corresponding tests and run them:
poetry run pytest
  • if the tests fail, fix them and run tests again until they pass

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

mloptiflow-0.0.83.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

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

mloptiflow-0.0.83-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

Details for the file mloptiflow-0.0.83.tar.gz.

File metadata

  • Download URL: mloptiflow-0.0.83.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Linux/5.15.154+

File hashes

Hashes for mloptiflow-0.0.83.tar.gz
Algorithm Hash digest
SHA256 e72d89d0c9cfa8e6ba86c22eccbb84576e3fdbbc24e4848bf4428788861799b3
MD5 f360d9c8ea9d567c561055a1c0930669
BLAKE2b-256 e9ec92ff787843c90a03f49b17c287dd6c323bf3dd33a912f08e79c7ed84ffdc

See more details on using hashes here.

File details

Details for the file mloptiflow-0.0.83-py3-none-any.whl.

File metadata

  • Download URL: mloptiflow-0.0.83-py3-none-any.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Linux/5.15.154+

File hashes

Hashes for mloptiflow-0.0.83-py3-none-any.whl
Algorithm Hash digest
SHA256 80b1c7251f04475d4b4ff7b7dd47717dcad884b56a77c07b5d16efa004fc0dfc
MD5 43312d4ff9a249f7a2bd2cf05d76429a
BLAKE2b-256 bfb562d50e9ad557ec9545d998a1c66cf3293513e78b45cbea0c201e7a8bb1b1

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