Skip to main content

ML Lifecycle Management Framework

Project description

MLOPTIFLOW

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

  2. install mloptiflow:

pip install mloptiflow
  1. initialize a new project and choose a name and paradigm (currently supported paradigms are: tabular_regression, tabular_classification):
mloptiflow init <your-project-name> --paradigm=<paradigm-name>
  1. cd into your project directory and (if using poetry) update name field in pyproject.toml file:
cd <your-project-name>
[tool.poetry]
name = "<your-project-name>"
  1. optionally, create a root package for the project and add __init__.py file:
mkdir <your-project-name>
touch <your-project-name>/__init__.py
  1. install dependencies:
poetry install --no-root

or (if you created root package):

poetry install

or if using pip:

pip install -r requirements.txt

Usage

  1. run the application:
streamlit run app.py

or:

poetry run streamlit run app.py
  1. optionally, adjust Dockerfile to your needs if you want to run the inference application in a containerized environment:
# mainly the WORKDIR
WORKDIR /<your-project-name>
  1. build the container image:
docker build -t <your-project-name> .
  1. run the container image:
docker run -p 8501:8501 <your-project-name>

Support

  • TBA

Roadmap

  • TBA

Contributing

  • TBA

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.11.tar.gz (12.3 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.11-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mloptiflow-0.0.11.tar.gz
Algorithm Hash digest
SHA256 f6f080d8fcb00c86ef19b12cf6bf3c3ff7d4a48cdc253ba3a236d9b581817c89
MD5 b3224d1287c60e2887351e0a55a8ba42
BLAKE2b-256 08075e5357b78f2ddc3a63973ca2531033a8658bc2ac417cf12b91f5b5e76a9e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mloptiflow-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 074d3495f3cca5d7466b6dfd15cc9d43832fcdad014124c66bb1c23ef382f35d
MD5 3c77c109fd155d991e887e54e409ff4e
BLAKE2b-256 da79049ddb1934b460663037e5c6a2bc89358f1d61305611a70f88be758f6f21

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