Skip to main content

Machine Learning Operations Toolkit

Project description

GitHub GitHub GitHub

⏳ Tempo: The MLOps Software Development Kit

Vision

Enable data scientists to see a productionised machine learning model within moments, not months. Easy to work with locally and also in kubernetes, whatever your preferred data science tools

Highlights

Tempo provides a unified interface to multiple MLOps projects that enable data scientists to deploy and productionise machine learning systems.

  • Package your trained model artifacts to optimized server runtimes (Tensorflow, PyTorch, Sklearn, XGBoost etc)
  • Package custom business logic to production servers.
  • Build an inference pipeline of models and orchestration steps.
  • Include any custom python components as needed. Examples:
    • Outlier detectors with Alibi-Detect.
    • Explainers with Alibi-Explain.
  • Test Locally - Deploy to Production
    • Run with local unit tests.
    • Deploy locally to Docker to test with Docker runtimes.
    • Deploy to production on Kubernetes
    • Extract declarative Kubernetes yaml to follow GitOps workflows.
  • Supporting a wide range of production runtimes
    • Seldon Core open source
    • KFServing open source
    • Seldon Deploy enterprise
  • Create stateful services. Examples:
    • Multi-Armed Bandits.

Workflow

  1. Develop locally.
  2. Test locally on Docker with production artifacts.
  3. Push artifacts to remote bucket store and launch remotely (on Kubernetes).

overview

Motivating Synopsis

Data scientists can easily test their models and orchestrate them with pipelines.

Below we see two Models (sklearn and xgboost) with a function decorated pipeline to call both.

sklearn_model = Model(
        name="test-iris-sklearn",
        platform=ModelFramework.SKLearn,
        protocol=SeldonProtocol(),
        local_folder=SKLEARN_FOLDER,
        uri="s3://tempo/basic/sklearn"
)

xgboost_model = Model(
        name="test-iris-xgboost",
        platform=ModelFramework.XGBoost,
        protocol=SeldonProtocol(),
        local_folder=XGBOOST_FOLDER,
        uri="s3://tempo/basic/xgboost"
)

@pipeline(name="classifier",
          uri="s3://tempo/basic/pipeline",
          local_folder=PIPELINE_ARTIFACTS_FOLDER,
          models=[sklearn_model, xgboost_model])
def classifier(payload: np.ndarray) -> Tuple[np.ndarray,str]:
    res1 = sklearn_model(payload)

    if res1[0][0] > 0.5:
        return res1,"sklearn prediction"
    else:
        return xgboost_model(payload),"xgboost prediction"

Save the pipeline code.

save(classifier, save_env=True)

Deploy to docker.

docker_runtime = SeldonDockerRuntime()
docker_runtime.deploy(classifier)
docker_runtime.wait_ready(classifier)

Make predictions on containerized servers that would be used in production.

classifier.remote(payload=np.array([[1, 2, 3, 4]]))

Deploy to Kubernetes for production.

k8s_runtime = SeldonKubernetesRuntime()
k8s_runtime.deploy(classifier)
k8s_runtime.wait_ready(classifier)

This is an extract from the two intridyctory examples for local and Kubernetes demos.

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

mlops-tempo-0.1.0.dev9.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

mlops_tempo-0.1.0.dev9-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file mlops-tempo-0.1.0.dev9.tar.gz.

File metadata

  • Download URL: mlops-tempo-0.1.0.dev9.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10

File hashes

Hashes for mlops-tempo-0.1.0.dev9.tar.gz
Algorithm Hash digest
SHA256 09025f198b72faa0d3105fde49c639939f7edc4b17f75a9e348339a25356389f
MD5 3dad268f677167f7fa3cd0696f3c7678
BLAKE2b-256 8d4e7a543194f18cdef7eaca6cbdaedb3ec4235518295443a1096b314476fd18

See more details on using hashes here.

File details

Details for the file mlops_tempo-0.1.0.dev9-py3-none-any.whl.

File metadata

  • Download URL: mlops_tempo-0.1.0.dev9-py3-none-any.whl
  • Upload date:
  • Size: 50.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10

File hashes

Hashes for mlops_tempo-0.1.0.dev9-py3-none-any.whl
Algorithm Hash digest
SHA256 44bc7bb46162e4c228b5c3c452c309e1ce4991847d53799daca4d36ca2d2a436
MD5 8f9eadeaab6e37cc6764ed7923d20bd5
BLAKE2b-256 1a23f906f2bdfc942e07546e1d644713b3cf84c281fae87b0c74d82e3debe294

See more details on using hashes here.

Supported by

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