Skip to main content

Lightweight ML Deployment Platform

Project description

productionize - deploy ML models directly from Python [WIP]

Version License Status macOS

productionize is an open-source lightweight ML deployment tool.
You can containerize, deploy and ship your model, without ever
having to leave your beloved Python.


Installation

productionize is a Python library, which is hosted on PyPi. Currently, the functions are only supported on macOS. On the darwin platform you can therefore download the package using pip.

pip install productionize

Usage

Once the library is properly installed from PyPi, you can source it using your standard python import command. The core of the library are it's three main classes, those can be imported as follows:

# import lib
from productionize import workbench, product

Once the main classes are sourced, you can setup your very own workbench on your local machine. The workbench consists of several tools:

  • Docker: a container technology, which helps us to build Docker container, which are the quasi-standard in Machine Learning deployment. You can read more about Docker here.
  • VirtualBox: a driver that is needed to create a VM on you local machine to host the Kubernetes cluster, which is at the heart of the workbench. You can read more about VirtualBox here
  • Kubectl: a cli which allows you to interact with Kubernetes. You won't have to do that, but productionize is running Kubernetes commands in the background.
  • Minikube: a local implemenation of Kubernetes. Minikube runs on a VM, which is administrated by Virtualbox.

To setup the workbench, these tools need to be installed. You can do this, by simple running the setup() method of the workbench class. Once initiated you can call the method.

# initiate class
cluster = workbench()

# install and setup components
cluster.setup()

To fire up the entire workbench, you first need to login to Docker Desktop. This is installed for you, however, you need to have it running. You can easily do this, just search on your computer - if you have a Mac you just use spotlight search - for Docker and start the application.

Next you will have to sign in. If you don't have an account already, you can create one for free at <a href="https://hub.docker.com>"Docker Hub. Which is a lot like GitHub, just for containers.

Once you did this, you are good to go on. You can now start the cluster using the start_cluster() method. This method allows you to set the resource quota for the cluster. Default are two CPUs and 2GB of memory.

# start the cluster
cluster.start_cluster(cpus = '2', memory = '2G')

To stop the cluster you can simply use the stop_cluster() method. This one just idles the cluster, but doesn't remove all the components.

# stop the cluster
cluster.stop_cluster()

To cleanly uninstall all the components, you can just run the uninstall() method and even specify which components to delete. The default is, that the components that existed on your machine before will be not removed.

# cleanly uninstall cluster components
cluster.uninstall(docker = None, kubectl = None, virtualbox = None, minikube = None, report = True)

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

productionize-0.0.4.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

productionize-0.0.4.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file productionize-0.0.4.1.tar.gz.

File metadata

  • Download URL: productionize-0.0.4.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for productionize-0.0.4.1.tar.gz
Algorithm Hash digest
SHA256 3c58b8fc6f9fb116e42b9c1087d97ac8a89d88aacf9692c769b68f65fa75bb3e
MD5 3c26d57ff0ddcd4d246bc007a55cdb05
BLAKE2b-256 77b44791bbea1c257d2c6a66598f4aa06df12e82e5784078a5871cdaadda038c

See more details on using hashes here.

File details

Details for the file productionize-0.0.4.1-py3-none-any.whl.

File metadata

  • Download URL: productionize-0.0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for productionize-0.0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 620b63e7175e60b9db3e1db5d7182b3035d3e7302ea67e22a09319f25c2e4d83
MD5 cae13eafb6200ca01c914a30a0831bcf
BLAKE2b-256 61a9478ea564dae536ac71ab23c6294de057a67360a4d6cdfa50fb4488ec35d1

See more details on using hashes here.

Supported by

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