BigML
Overview
If you use BigML to train machine learning models, you can import those models directly into Modzy. Using BigML with Modzy together provides a number of benefits:
- BigML offers easy to use AutoML features for supervised and unsupervised learning
- Modzy offers model deployment, serving, integration, and monitoring on nearly any device
This guide will show you how to export a model from BigML and convert it into an OMI-compliant container image that can be imported into Modzy.
What you will need to get started
Integration Workflow

Download your model from BigML

In order to download a model that you've trained in BIgML, visit your model's summary page and then select the Download Actionable Model option on the top right of the screen to export your model.
In the language selection box that appears, select Python. Once the model has finished downloading, open up the python file and the copy and paste the model code into a Jupyter notebook.
This Python code will look different based on the type of model you build. For some model types (e.g., deepnet, linear regression, logistic regression, ensemble, time series), you will need to install the BigML python SDK to execute this snippet of code.
pip install bigml
Below are some example BigML code snippets that have been exported to Python:
# tree model
def predict_winner(data={}):
""" Predictor for Winner from model/62abcdf335f2d00768001d67
Premier League 2011-2012 season stats and team incomes
Source
Statistical data at football-data.co.uk[*]
Financial data at Premier League accounts, 2011-12[*]
[*]football-data.co.uk: http://www.football-data.co.uk/englandm.php
[*]Premier League accounts, 2011-12: https://docs.google.com/a/bigml.com/spreadsheet/ccc?key=0AonYZs4MzlZbdEF3MC1waGcwZEd0Y2EzdXFoMXVzcmc#gid=0
"""
if (data.get('home_tv_and_broadcasting_psm_') is None):
return u'Home'
if (data['home_tv_and_broadcasting_psm_'] > 50):
if (data.get('home_commercial_income_psm_') is None):
return u'Home'
if (data['home_commercial_income_psm_'] > 94):
if (data.get('date_day_of_month') is None):
return u'Home'
if (data['date_day_of_month'] > 21):
if (data.get('home_yellow_cards') is None):
return u'Home'
if (data['home_yellow_cards'] > 1):
if (data.get('home_corners') is None):
return u'Home'
if (data['home_corners'] > 13):
return u'Away'
if (data['home_corners'] <= 13):
if (data['home_yellow_cards'] > 3):
return u'Away'
if (data['home_yellow_cards'] <= 3):
return u'Home'
if (data['home_yellow_cards'] <= 1):
if (data.get('away_shots') is None):
return u'Home'
if (data['away_shots'] > 7):
if (data.get('date_day_of_week') is None):
return u'Draw'
if (data['date_day_of_week'] > 4):
return u'Draw'
if (data['date_day_of_week'] <= 4):
return u'Home'
if (data['away_shots'] <= 7):
return u'Home'
if (data['date_day_of_month'] <= 21):
return u'Home'
if (data['home_commercial_income_psm_'] <= 94):
if (data.get('away_commercial_income_psm_') is None):
return u'Home'
if (data['away_commercial_income_psm_'] > 24):
if (data.get('away_red_cards') is None):
return u'Away'
if (data['away_red_cards'] > 0):
if (data.get('date_day_of_month') is None):
return u'Home'
if (data['date_day_of_month'] > 12):
if (data.get('away_shots') is None):
return u'Draw'
if (data['away_shots'] > 6):
return u'Draw'
if (data['away_shots'] <= 6):
return u'Home'
if (data['date_day_of_month'] <= 12):
return u'Home'
if (data['away_red_cards'] <= 0):
if (data.get('away_tv_and_broadcasting_psm_') is None):
return u'Away'
if (data['away_tv_and_broadcasting_psm_'] > 96):
if (data.get('away_shots') is None):
return u'Away'
if (data['away_shots'] > 9):
if (data.get('home_fouls_committed') is None):
return u'Draw'
if (data['home_fouls_committed'] > 7):
return u'Draw'
if (data['home_fouls_committed'] <= 7):
return u'Away'
if (data['away_shots'] <= 9):
if (data.get('away_fouls_committed') is None):
return u'Home'
if (data['away_fouls_committed'] > 11):
return u'Home'
if (data['away_fouls_committed'] <= 11):
return u'Away'
if (data['away_tv_and_broadcasting_psm_'] <= 96):
if (data.get('away_corners') is None):
return u'Away'
if (data['away_corners'] > 6):
if (data.get('home_fouls_committed') is None):
return u'Home'
if (data['home_fouls_committed'] > 13):
return u'Away'
if (data['home_fouls_committed'] <= 13):
return u'Home'
if (data['away_corners'] <= 6):
return u'Away'
if (data['away_commercial_income_psm_'] <= 24):
if (data.get('home_shots') is None):
return u'Home'
if (data['home_shots'] > 22):
if (data.get('home_fouls_committed') is None):
return u'Draw'
if (data['home_fouls_committed'] > 9):
if (data['home_fouls_committed'] > 12):
return u'Draw'
if (data['home_fouls_committed'] <= 12):
return u'Away'
if (data['home_fouls_committed'] <= 9):
return u'Draw'
if (data['home_shots'] <= 22):
if (data.get('away_shots_on_target') is None):
return u'Home'
if (data['away_shots_on_target'] > 5):
if (data.get('home_corners') is None):
return u'Draw'
if (data['home_corners'] > 8):
return u'Away'
if (data['home_corners'] <= 8):
if (data.get('away_fouls_committed') is None):
return u'Draw'
if (data['away_fouls_committed'] > 5):
if (data.get('home_fouls_committed') is None):
return u'Draw'
if (data['home_fouls_committed'] > 10):
if (data['home_corners'] > 6):
return u'Home'
if (data['home_corners'] <= 6):
if (data.get('date_day_of_month') is None):
return u'Draw'
if (data['date_day_of_month'] > 11):
return u'Draw'
if (data['date_day_of_month'] <= 11):
return u'Home'
if (data['home_fouls_committed'] <= 10):
if (data.get('date_day_of_week') is None):
return u'Draw'
if (data['date_day_of_week'] > 6):
return u'Home'
if (data['date_day_of_week'] <= 6):
return u'Draw'
if (data['away_fouls_committed'] <= 5):
return u'Away'
if (data['away_shots_on_target'] <= 5):
if (data.get('home_corners') is None):
return u'Home'
if (data['home_corners'] > 7):
if (data['home_tv_and_broadcasting_psm_'] > 74):
return u'Home'
if (data['home_tv_and_broadcasting_psm_'] <= 74):
if (data.get('away_yellow_cards') is None):
return u'Draw'
if (data['away_yellow_cards'] > 1):
if (data['home_corners'] > 8):
return u'Home'
if (data['home_corners'] <= 8):
return u'Draw'
if (data['away_yellow_cards'] <= 1):
return u'Draw'
if (data['home_corners'] <= 7):
return u'Home'
if (data['home_tv_and_broadcasting_psm_'] <= 50):
if (data.get('away_turnover_psm_') is None):
return u'Away'
if (data['away_turnover_psm_'] > 79):
if (data.get('away_tv_and_broadcasting_psm_') is None):
return u'Away'
if (data['away_tv_and_broadcasting_psm_'] > 54):
if (data.get('home_yellow_cards') is None):
return u'Away'
if (data['home_yellow_cards'] > 2):
if (data.get('home_shots_on_target') is None):
return u'Away'
if (data['home_shots_on_target'] > 9):
return u'Home'
if (data['home_shots_on_target'] <= 9):
return u'Away'
if (data['home_yellow_cards'] <= 2):
if (data.get('away_fouls_committed') is None):
return u'Away'
if (data['away_fouls_committed'] > 12):
if (data.get('away_gate_and_matchday_income_psm_') is None):
return u'Away'
if (data['away_gate_and_matchday_income_psm_'] > 33):
if (data.get('home_fouls_committed') is None):
return u'Home'
if (data['home_fouls_committed'] > 6):
return u'Home'
if (data['home_fouls_committed'] <= 6):
return u'Away'
if (data['away_gate_and_matchday_income_psm_'] <= 33):
return u'Away'
if (data['away_fouls_committed'] <= 12):
if (data.get('away_shots') is None):
return u'Away'
if (data['away_shots'] > 23):
return u'Home'
if (data['away_shots'] <= 23):
if (data['away_fouls_committed'] > 11):
if (data['away_shots'] > 13):
return u'Draw'
if (data['away_shots'] <= 13):
return u'Home'
if (data['away_fouls_committed'] <= 11):
if (data.get('away_red_cards') is None):
return u'Away'
if (data['away_red_cards'] > 0):
if (data.get('home_fouls_committed') is None):
return u'Home'
if (data['home_fouls_committed'] > 9):
return u'Draw'
if (data['home_fouls_committed'] <= 9):
return u'Home'
if (data['away_red_cards'] <= 0):
if (data.get('date_day_of_week') is None):
return u'Away'
if (data['date_day_of_week'] > 6):
return u'Away'
if (data['date_day_of_week'] <= 6):
if (data.get('home_fouls_committed') is None):
return u'Away'
if (data['home_fouls_committed'] > 7):
if (data.get('away_corners') is None):
return u'Away'
if (data['away_corners'] > 9):
return u'Away'
if (data['away_corners'] <= 9):
if (data.get('home_shots') is None):
return u'Draw'
if (data['home_shots'] > 15):
return u'Away'
if (data['home_shots'] <= 15):
if (data['away_shots'] > 12):
return u'Draw'
if (data['away_shots'] <= 12):
if (data['home_fouls_committed'] > 8):
return u'Away'
if (data['home_fouls_committed'] <= 8):
return u'Draw'
if (data['home_fouls_committed'] <= 7):
if (data.get('home_corners') is None):
return u'Away'
if (data['home_corners'] > 2):
return u'Away'
if (data['home_corners'] <= 2):
return u'Draw'
if (data['away_tv_and_broadcasting_psm_'] <= 54):
if (data.get('home_fouls_committed') is None):
return u'Draw'
if (data['home_fouls_committed'] > 8):
if (data.get('away_shots') is None):
return u'Away'
if (data['away_shots'] > 8):
if (data.get('away_yellow_cards') is None):
return u'Away'
if (data['away_yellow_cards'] > 0):
return u'Away'
if (data['away_yellow_cards'] <= 0):
if (data.get('home_corners') is None):
return u'Draw'
if (data['home_corners'] > 9):
return u'Away'
if (data['home_corners'] <= 9):
return u'Draw'
if (data['away_shots'] <= 8):
return u'Draw'
if (data['home_fouls_committed'] <= 8):
if (data.get('home_shots_on_target') is None):
return u'Draw'
if (data['home_shots_on_target'] > 11):
return u'Home'
if (data['home_shots_on_target'] <= 11):
return u'Draw'
if (data['away_turnover_psm_'] <= 79):
if (data.get('home_turnover_psm_') is None):
return u'Home'
if (data['home_turnover_psm_'] > 73):
if (data.get('date_day_of_month') is None):
return u'Home'
if (data['date_day_of_month'] > 26):
return u'Draw'
if (data['date_day_of_month'] <= 26):
if (data['date_day_of_month'] > 21):
if (data['home_tv_and_broadcasting_psm_'] > 48):
return u'Home'
if (data['home_tv_and_broadcasting_psm_'] <= 48):
if (data.get('away_red_cards') is None):
return u'Away'
if (data['away_red_cards'] > 0):
return u'Home'
if (data['away_red_cards'] <= 0):
return u'Away'
if (data['date_day_of_month'] <= 21):
if (data.get('away_corners') is None):
return u'Home'
if (data['away_corners'] > 3):
if (data.get('away_fouls_committed') is None):
return u'Home'
if (data['away_fouls_committed'] > 6):
if (data.get('away_shots') is None):
return u'Draw'
if (data['away_shots'] > 12):
return u'Draw'
if (data['away_shots'] <= 12):
if (data.get('home_yellow_cards') is None):
return u'Home'
if (data['home_yellow_cards'] > 0):
if (data['away_shots'] > 8):
return u'Home'
if (data['away_shots'] <= 8):
if (data.get('home_corners') is None):
return u'Draw'
if (data['home_corners'] > 8):
return u'Home'
if (data['home_corners'] <= 8):
return u'Draw'
if (data['home_yellow_cards'] <= 0):
return u'Draw'
if (data['away_fouls_committed'] <= 6):
return u'Home'
if (data['away_corners'] <= 3):
if (data.get('away_shots') is None):
return u'Away'
if (data['away_shots'] > 5):
return u'Away'
if (data['away_shots'] <= 5):
if (data.get('home_fouls_committed') is None):
return u'Home'
if (data['home_fouls_committed'] > 7):
return u'Home'
if (data['home_fouls_committed'] <= 7):
return u'Draw'
if (data['home_turnover_psm_'] <= 73):
if (data.get('date_month') is None):
return u'Away'
if (data['date_month'] > 2):
if (data.get('away_shots_on_target') is None):
return u'Home'
if (data['away_shots_on_target'] > 12):
return u'Draw'
if (data['away_shots_on_target'] <= 12):
if (data['home_tv_and_broadcasting_psm_'] > 42):
if (data.get('home_shots_on_target') is None):
return u'Home'
if (data['home_shots_on_target'] > 6):
if (data['home_shots_on_target'] > 9):
if (data.get('away_commercial_income_psm_') is None):
return u'Home'
if (data['away_commercial_income_psm_'] > 7):
return u'Draw'
if (data['away_commercial_income_psm_'] <= 7):
return u'Home'
if (data['home_shots_on_target'] <= 9):
if (data.get('home_corners') is None):
return u'Away'
if (data['home_corners'] > 6):
if (data.get('home_fouls_committed') is None):
return u'Away'
if (data['home_fouls_committed'] > 14):
return u'Away'
if (data['home_fouls_committed'] <= 14):
if (data['home_fouls_committed'] > 9):
return u'Home'
if (data['home_fouls_committed'] <= 9):
return u'Away'
if (data['home_corners'] <= 6):
if (data.get('away_fouls_committed') is None):
return u'Away'
if (data['away_fouls_committed'] > 8):
return u'Away'
if (data['away_fouls_committed'] <= 8):
if (data.get('home_fouls_committed') is None):
return u'Draw'
if (data['home_fouls_committed'] > 9):
return u'Draw'
if (data['home_fouls_committed'] <= 9):
return u'Away'
if (data['home_shots_on_target'] <= 6):
if (data.get('away_tv_and_broadcasting_psm_') is None):
return u'Home'
if (data['away_tv_and_broadcasting_psm_'] > 44):
if (data.get('away_shots') is None):
return u'Draw'
if (data['away_shots'] > 6):
return u'Draw'
if (data['away_shots'] <= 6):
return u'Home'
if (data['away_tv_and_broadcasting_psm_'] <= 44):
return u'Home'
if (data['home_tv_and_broadcasting_psm_'] <= 42):
if (data.get('away_gate_and_matchday_income_psm_') is None):
return u'Away'
if (data['away_gate_and_matchday_income_psm_'] > 9):
return u'Home'
if (data['away_gate_and_matchday_income_psm_'] <= 9):
if (data.get('away_fouls_committed') is None):
return u'Away'
if (data['away_fouls_committed'] > 12):
return u'Home'
if (data['away_fouls_committed'] <= 12):
return u'Away'
if (data['date_month'] <= 2):
if (data.get('date_day_of_month') is None):
return u'Away'
if (data['date_day_of_month'] > 23):
return u'Home'
if (data['date_day_of_month'] <= 23):
if (data.get('away_shots') is None):
return u'Away'
if (data['away_shots'] > 16):
if (data.get('home_fouls_committed') is None):
return u'Home'
if (data['home_fouls_committed'] > 8):
return u'Home'
if (data['home_fouls_committed'] <= 8):
return u'Away'
if (data['away_shots'] <= 16):
return u'Away'
# Requires BigML Python bindings
#
# Install via: pip install bigml
#
# or clone it:
# git clone https://github.com/bigmlcom/python.git
from bigml.ensemble import Ensemble
# Downloads and generates a local version of the ensemble, if it
# hasn't been downloaded previously.
from bigml.api import BigML
ensemble = Ensemble('ensemble/62abd48caba2df28f7002648',
api=BigML("bmunday1",
"640ef9fba083307aef1b9345934dbf59500b7199",
domain="bigml.io"))
# To make predictions fill the desired input_data in next line.
input_data = {}
ensemble.predict(input_data, full=True)
#
# input_data: dict for the input values
# (e.g. {"petal length": 1, "sepal length": 3})
# full: if set to True, the output will be a dictionary that includes all the
# available information in the predicted node. The attributes vary depending
# on the ensemble type. Please check:
# https://bigml.readthedocs.io/en/latest/#local-ensemble-s-predictions
# Requires BigML Python bindings
#
# Install via: pip install bigml
#
# or clone it:
# git clone https://github.com/bigmlcom/python.git
from bigml.linear import LinearRegression
from bigml.api import BigML
# Downloads and generates a local version of the linear regression,
# if it hasn't been downloaded previously.
linearregression = LinearRegression('linearregression/62abd4c0aba2df28fd002392',
api=BigML("bmunday1",
"640ef9fba083307aef1b9345934dbf59500b7199",
domain="bigml.io"))
# To make predictions fill the desired input_data
# in next line. All fields are compulsory if they don't have
# missing values.
input_data = {
"Winner": "Home",
"Away Turnover (£m)": 1,
"Home Commercial income (£m)": 1,
"Away TV and Broadcasting (£m)": 1,
"Away Gate and Matchday income (£m)": 1,
"Home TV and Broadcasting (£m)": 1,
"Home Turnover (£m)": 1,
"Home Gate and Matchday income (£m)": 1,
"Home red cards": 1,
"Away red cards": 1,
"Away yellow cards": 1,
"Date.day-of-week": 1,
"Date.day-of-month": 1,
"Date.month": 1,
"Date.year": 1,
"Away fouls committed": 1,
"Home corners": 1,
"Away shots on target": 1,
"Home fouls committed": 1,
"Away shots": 1,
"Home shots on target": 1,
"Date": 1,
"Home shots": 1,
"Away corners": 1,
"Home yellow cards": 1
}
linearregression.predict(input_data)
# Requires BigML Python bindings
#
# Install via: pip install bigml
#
# or clone it:
# git clone https://github.com/bigmlcom/python.git
from bigml.logistic import LogisticRegression
from bigml.api import BigML
# Downloads and generates a local version of the logistic regression,
# if it hasn't been downloaded previously.
logisticregression = LogisticRegression('logisticregression/62abd2428be2aa5e72001a19',
api=BigML("bmunday1",
"640ef9fba083307aef1b9345934dbf59500b7199",
domain="bigml.io"))
# To predict probabilities fill the desired input_data
# in next line. Numeric fields are compulsory if the model was not
# trained with missing numerics.
input_data = {
"Away Commercial income (£m)": 1,
"Away Turnover (£m)": 1,
"Home Commercial income (£m)": 1,
"Away TV and Broadcasting (£m)": 1,
"Away Gate and Matchday income (£m)": 1,
"Home TV and Broadcasting (£m)": 1,
"Home Turnover (£m)": 1,
"Home Gate and Matchday income (£m)": 1,
"Home red cards": 1,
"Away red cards": 1,
"Away yellow cards": 1,
"Date.day-of-week": 1,
"Date.day-of-month": 1,
"Date.month": 1,
"Date.year": 1,
"Away fouls committed": 1,
"Home corners": 1,
"Away shots on target": 1,
"Home fouls committed": 1,
"Away shots": 1,
"Home shots on target": 1,
"Date": 1,
"Home shots": 1,
"Away corners": 1,
"Home yellow cards": 1
}
logisticregression.predict(input_data, full=True)
#
# input_data: dict for the input values
# (e.g. {"petal length": 1, "sepal length": 3})
# full: if set to True, the output will be a dictionary that includes the
# distribution of each class in the objective field, the predicted class and
# its probability. Please check:
# https://bigml.readthedocs.io/en/latest/#local-logistic-regression-predictions
# deepnet
# Requires BigML Python bindings
#
# Install via: pip install bigml
#
# or clone it:
# git clone https://github.com/bigmlcom/python.git
from bigml.deepnet import Deepnet
from bigml.api import BigML
# Downloads and generates a local version of the DEEPNET,
# if it hasn't been downloaded previously.
deepnet = Deepnet('deepnet/62abcfb08be2aa5e75001c1f',
api=BigML("bmunday1",
"640ef9fba083307aef1b9345934dbf59500b7199",
domain="bigml.io"))
# To make predictions fill the desired input_data in next line.
input_data = {
"Away Commercial income (£m)": 1,
"Away Turnover (£m)": 1,
"Home Commercial income (£m)": 1,
"Away TV and Broadcasting (£m)": 1,
"Away Gate and Matchday income (£m)": 1,
"Home TV and Broadcasting (£m)": 1,
"Home Turnover (£m)": 1,
"Home Gate and Matchday income (£m)": 1,
"Home red cards": 1,
"Away red cards": 1,
"Away yellow cards": 1,
"Date.day-of-week": 1,
"Date.day-of-month": 1,
"Date.month": 1,
"Date.year": 1,
"Away fouls committed": 1,
"Home corners": 1,
"Away shots on target": 1,
"Home fouls committed": 1,
"Away shots": 1,
"Home shots on target": 1,
"Date": 1,
"Home shots": 1,
"Away corners": 1,
"Home yellow cards": 1
}
deepnet.predict(input_data, full=True)
#
# input_data: dict for the input values
# (e.g. {"petal length": 1, "sepal length": 3})
# full: if set to True, the output will be a dictionary that includes all the
# available information about the prediction. The attributes vary depending
# on the ensemble type. Please check:
# https://bigml.readthedocs.io/en/latest/#local-deepnet-predictions
# Requires BigML Python bindings
#
# Install via: pip install bigml
#
# or clone it:
# git clone https://github.com/bigmlcom/python.git
from bigml.timeseries import TimeSeries
from bigml.api import BigML
# Downloads and generates a local version of the TIME SERIES,
# if it hasn't been downloaded previously.
timeseries = TimeSeries('timeseries/62abd4268be2aa5e6e001962',
api=BigML("bmunday1",
"640ef9fba083307aef1b9345934dbf59500b7199",
domain="bigml.io"))
# To forecast the time series fill the desired input_data in the line below.
# Only the ID of the fields to predict with are required,
# you can also specify submodels to calculate.
input_data = {
"000014": {"horizon": 50}
}
timeseries.forecast(input_data)
# The result is a list of probabilities per forecast which values are between
# 0 and 1.
The final step before you can start converting and importing your BigML to Modzy is to download a sample piece of data for testing. You'll also need to make sure it's formatted to meet your model's input requirements.
You can use the BigML API to download your dataset directly, or save some sample data based on the Python code snippet returned for your model.
input_data = {
"Winner": "Home",
"Away Turnover (£m)": 1,
"Home Commercial income (£m)": 1,
"Away TV and Broadcasting (£m)": 1,
"Away Gate and Matchday income (£m)": 1,
"Home TV and Broadcasting (£m)": 1,
"Home Turnover (£m)": 1,
"Home Gate and Matchday income (£m)": 1,
"Home red cards": 1,
"Away red cards": 1,
"Away yellow cards": 1,
"Date.day-of-week": 1,
"Date.day-of-month": 1,
"Date.month": 1,
"Date.year": 1,
"Away fouls committed": 1,
"Home corners": 1,
"Away shots on target": 1,
"Home fouls committed": 1,
"Away shots": 1,
"Home shots on target": 1,
"Date": 1,
"Home shots": 1,
"Away corners": 1,
"Home yellow cards": 1
}
import json
with open("sample_premier_league.json", "w") as f:
json.dump(input_data, f)
Edit your process function

Next, you'll convert this python function into a container image that can be deployed to Modzy. To start, you'll need to transform the prediction function from Python model code you downloaded into the process
function you will need for Chassis. The code below assumes we are using the "Tree Model" exported model.
import json
import numpy as np
from chassisml import ChassisModel
from chassis.builder import DockerBuilder
from typing import Mapping, Dict
def process(input_bytes):
input_data = json.loads(input_bytes["input"])
prediction = predict_winner(input_data)
output = {
"predictedWinner": prediction
}
return {"results.json": json.dumps(output).encode()}
Create model container locally

First, use your predict
function you defined to create a ChassisModel
object and publish your model. Next, define some metadata (pip requirements, inputs, outputs, etc.). Finally, you can test your Chassis model and build a container using the DockerBuilder
option.
# create chassis model object, add required dependencies, and define metadata
chassis_model = ChassisModel(process_fn=predict)
chassis_model.add_requirements([])
chassis_model.metadata.model_name = "Premier League Season Winner Prediction"
chassis_model.metadata.model_version = "0.0.1"
chassis_model.metadata.add_input(
key="input",
accepted_media_types=["application/json"],
max_size="10M",
description="Premier league data"
)
chassis_model.metadata.add_output(
key="results.json",
media_type="application/json",
max_size="1M",
description="Model prediction"
)
# test model
results = chassis_model.test(guides.DigitsSampleData)
print(results)
# build container
builder = DockerBuilder(chassis_model)
start_time = time.time()
res = builder.build_image(name="bigml-model", tag="0.0.1", show_logs=True)
end_time = time.time()
print(res)
print(f"Container image built in {round((end_time-start_time)/60, 5)} minutes")
This code should take just under a minute. The job_results
of a succesful built will display the details of your new container image (note: the "Image ID" digest will be different for each build)
Generating Dockerfile...Done!
Copying libraries...Done!
Writing metadata...Done!
Compiling pip requirements...Done!
Copying files...Done!
Starting Docker build...Done!
Image ID: sha256:d222014ffe7bacd27382fb00cb8686321e738d7c80d65f0290f4c303459d3d65
Image Tags: ['bigml-model:0.0.1']
Cleaning local context
Completed: True
Success: True
Image Tag: bigml-model:0.0.1
Import container image into Modzy

Lastly, you can deploy your BigML model container into Modzy in just a few simple steps and be ready to run, monitor, and integrate your model at massive scale!
Updated 25 days ago