Skip to main content

BlueTarget

Deploy, monitor and explain machine learning models.

Logo

BlueTarget is a MLops platform which allows ML engineer and Data Science deploy, monitor and explain their machine learning models. We're able to deploy your model using different kind of strategies like A/B testing, Canary or Rolling update.

Get started with the BlueTarget.

What can I do with BlueTarget?

If you've ever tried to get a model out of a Jupyter notebook, BlueTargert is for you.

BlueTarget allow your to deploy your ML model taking away the whole complexity of the cloud. However If you prefer to have the control of the infrastructure, BlueTarget can work with your preferred cloud:

Here are some of the things BlueTarget does:

  • Turns your Python model into a microservice with a production-ready API endpoint, no need for Flask or Django.
  • Track your model's version and metadata
  • Understad the drift of your model
  • Track your inference
  • Deployment strategies like A/B testing, canary and rolling update

Installation

BlueTarget requires Python >=3.7

To install from PyPi, run:

pip install bluetarget

BlueTarget is actively developed, and we recommend using the latest version. To update your BlueTarget installation, run:

pip install --upgrade bluetarget

How to use BlueTarget

Quickstart: making a BlueTarget

train.py

!pip install --upgrade scikit-learn bluetarget pickle-mixin

from sklearn import svm
from sklearn import datasets

import pickle

# Load training data set
iris = datasets.load_iris()
X, y = iris.data, iris.target

# Train the model
clf = svm.SVC(gamma='scale')
clf.fit(X, y)

pickle.dump(clf, open('model.pkl', 'wb'))

service.py

import os
from typing import Dict, List

class Model:
    def __init__(self) -> None:
        self._model = None

    def load(self):
        import pickle

        with open(f"{os.path.dirname(__file__)}/model.pkl", 'rb') as pickle_file:
            self._model = pickle.load(pickle_file)

    def predict(self, request: Dict) -> Dict[str, List]:
        response = {}
        inputs = request["inputs"]
        result = self._model.predict(inputs).tolist()
        response["predictions"] = result

        return response

requirements.txt

scikit-learn==1.0.2
pickle-mixin==1.0.2

deploy.py

from bluetarget import BlueTarget

bt = BlueTarget(api_key="YOUR_API_KEY")

bt.deploy(
    model_name="YourFirstModel",
    model_class="Model",
    model_files=["model.py", "model.pkl"],
    requirements_file="requirements.txt"
)

inputs = [
    [6.9, 3.1, 5.1, 2.3],
    [5.8, 2.7, 5.1, 1.9],
    [6.8, 3.2, 5.9, 2.3],
    [6.7, 3.3, 5.7, 2.5],
    [6.7, 3.,  5.2, 2.3],
    [6.3, 2.5, 5.,  1.9],
    [6.5, 3.,  5.2, 2.],
    [6.2, 3.4, 5.4, 2.3],
    [5.9, 3.,  5.1, 1.8]
]

bt.predict(inputs)

# {
#     "predictions": [
#         2,
#         1,
#         2,
#         3,
#         0,
#         2,
#         3,
#         2,
#         1
#     ]
# }

Metadata

Release files for bluetarget 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bluetarget 0.3.1
File Size Uploaded Provenance Actions
bluetarget-0.3.1.tar.gz 9.1 kB Without provenance Details for bluetarget-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bluetarget 0.3.1
File Interpreter ABI Platform Actions
bluetarget-0.3.1-py3-none-any.whl Python 3 none any Details for bluetarget-0.3.1-py3-none-any.whl

Total release size: 19.6 kB

Release files / bluetarget-0.3.1.tar.gz

Download URL bluetarget-0.3.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7083cf9e952add27e9b65cf5db8d2aa7ba806da884f9e958d76c7bae6279fd39
BLAKE2b-256 checksum
How to use checksums
64503bc95227758f9be950fdb61af3c010677382ed6cb20ffaf92cd8e54b56eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.8.10 Linux/5.4.0-135-generic

Release files / bluetarget-0.3.1-py3-none-any.whl

Download URL bluetarget-0.3.1-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f52ed47ae035d5cc9dbca6a943dca560f2d9c764e5d44de4418e45213ba01ee3
BLAKE2b-256 checksum
How to use checksums
defc4ef9c93bf16014845fc022ceae193e074a5d82e016a759aa876b1d932543
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.8.10 Linux/5.4.0-135-generic

Security for bluetarget 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page