Machine Learning Operations Toolkit
Project description
Tempo: The MLOps Software Development Kit
An open source framework to enable data scientists to productionise, test and deploy models with simple workflows that abstract the underlying complexity of scalable MLOps platforms.
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
- Develop locally.
- Test locally on Docker with production artifacts.
- Push artifacts to remote bucket store and launch remotely (on Kubernetes).
Motivating Synopsis
Data scientists can easily test their models and orchestrate them with pipelines.
Below we see two Model
s (sklearn and xgboost) with a function decorated pipeline
to call both.
def get_tempo_artifacts(artifacts_folder: str) -> Tuple[Pipeline, Model, Model]:
sklearn_model = Model(
name="test-iris-sklearn",
platform=ModelFramework.SKLearn,
local_folder=f"{artifacts_folder}/{SKLearnFolder}",
uri="s3://tempo/basic/sklearn",
)
xgboost_model = Model(
name="test-iris-xgboost",
platform=ModelFramework.XGBoost,
local_folder=f"{artifacts_folder}/{XGBoostFolder}",
uri="s3://tempo/basic/xgboost",
)
@pipeline(
name="classifier",
uri="s3://tempo/basic/pipeline",
local_folder=f"{artifacts_folder}/{PipelineFolder}",
models=PipelineModels(sklearn=sklearn_model, xgboost=xgboost_model),
)
def classifier(payload: np.ndarray) -> Tuple[np.ndarray, str]:
res1 = classifier.models.sklearn(input=payload)
if res1[0] == 1:
return res1, SKLearnTag
else:
return classifier.models.xgboost(input=payload), XGBoostTag
return classifier, sklearn_model, xgboost_model
Save the pipeline code.
from tempo.serve.loader import save
save(classifier)
Deploy locally to docker.
from tempo import deploy_local
remote_model = deploy_local(classifier)
Make predictions on containerized servers that would be used in production.
remote_model.predict(np.array([[1, 2, 3, 4]]))
Deploy to Kubernetes for production.
from tempo.serve.metadata import SeldonCoreOptions
from tempo import deploy_remote
runtime_options = SeldonCoreOptions(**{
"remote_options": {
"namespace": "production",
"authSecretName": "minio-secret"
}
})
remote_model = deploy_remote(classifier, options=runtime_options)
This is an extract from the multi-model introduction demo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mlops-tempo-0.5.1.tar.gz
.
File metadata
- Download URL: mlops-tempo-0.5.1.tar.gz
- Upload date:
- Size: 47.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d20c3b1c4e13d83dd434065932e567d6340ce47719a8f74c343a01b18569b94 |
|
MD5 | b330fda4b2d697e98132bdf72e3cc36f |
|
BLAKE2b-256 | 887cfb583e4db14cbd5e9fe87ed50f60da66dc39a463522ab9917c348fcca2ec |
File details
Details for the file mlops_tempo-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: mlops_tempo-0.5.1-py3-none-any.whl
- Upload date:
- Size: 78.0 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79c04a456f8ec1c8482cc1134f48879c2d05e626760d91ffba2282905b3d1e9c |
|
MD5 | f8e7873dbcebf7f0386a291865f9f5ec |
|
BLAKE2b-256 | 242e3aac69d1bc283119fe5a0d98a9b4a120d03504f4f8f7a1d26b7abe36e151 |