Skip to main content

Auto generate a fully functional Machine Learning pipeline

Project description

BlackBox Ops

Auto generate a fully functional Machine Learning pipeline with publish-ready output



pip install blackboxops --upgrade


  • For trainable models

    python -m blackboxops --name ProjectName
  • For non-trainable models (e.g. deterministic algorithm)

    python -m blackboxops --name ProjectName --noflow


Obtain tree structure (as of 2/17/2020)

├── ProjectName
│   ├──
│   ├──
│   ├── bookkeeper
│   │   └──
│   ├── model
│   │   └──
│   └── performance
│       └──
├── doc
│   └── img
│       ├── main_architecture.png
│       └── model_pipeline.png
├── flow
│   ├──
│   ├── data_pipeline
│   │   └──
│   ├── flow
│   │   └──
│   ├──
│   ├── tracker
│   │   ├──
│   │   └── templates
│   │       └── index.html
│   └──
└── tests

Model Pipeline

This project is based on the following concepts

ML Architecture

Python Architecture

The architecture of the code generated

ML Architecture

Key Concepts


Every (ready to deploy) model follows the following versioning convention

<center> Major.Minor.Score </center>


  • Major: tracks the software around this model, as well as its interface. As long as changes are backward compatible, this shouldn't change.
  • Minor: Changes to the model that don't break backwards compatibility. A typical case: changing the performance metric.
  • Score: this is autogenerated by the model, where 0 literally means "never trained" and 9999 means "model reached perfect accuracy". Every trained model generates a score and deployments are based on best score.

Every models starts its life with version 0.1.0

Project Structure

Once the project is packaged and ready to ship (typically via a wheel), the portion of the code that gets shipped is

├── ProjectName
│   │
│   ├──
│   │
│   ├──
│   ├── bookkeeper
│   │   └──
│   ├── model
│   │   └──
│   └── performance
│       └──

where the classes bookkeeper and performance take care of the background working of the model and model is the class exposed with its interface fully defined in If everything is working in the way it is supposed to work, the file is the only code you should interact with.

Once your model has been deployed, you could use it in your scripts (after it has been pip installed) as

import ProjectName

mdl = ProjectName.Model()


y = mdl.some_method_defined_by_you(X)

Model Usage

There are three functions that are required for the user to define at ProjectName/, namely

  • version()
  • backend_performance()
  • backend_model()
  • interface_methods()


This method is a one line denoting the major M and minor m versioning of the model as

# Architecture Version
def version():
        '0.1' # M=0, m=1

Later in this document, we'll see how the full version of a model has the form

M.m.xxxx # Major.Minor.Score

where score is fully determined by the training of the model. More on how these values are set later with the introduction of the class ModelMutable

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for blackboxops, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size blackboxops-0.1.5-py3-none-any.whl (203.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size blackboxops-0.1.5.tar.gz (205.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page