Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dominodatalab/reference-project-domino-mlflow-supported-models
https://github.com/dominodatalab/reference-project-domino-mlflow-supported-models
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dominodatalab/reference-project-domino-mlflow-supported-models
- Owner: dominodatalab
- Created: 2023-10-10T08:38:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-15T17:45:51.000Z (about 1 year ago)
- Last Synced: 2023-11-15T20:23:35.579Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 31.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Domino MLflow Models
This project contains examples of various MLflow supported models such as XGBoost, Sklearn, PyTorch, TensorFlow, and custom Pyfunc models. These include code snippets to register the model to MLflow, register training sets to Domino, and configuring prediction data capture.
The assets included in the project are:
* **domino-mlflow-model-sklearn-imm.ipynb** - a notebook that trains a sklearn linear regression model on the California Housing Prices dataset and does the following:
* Registers the training data used as a training set
* Creates a pyfunc model wrapper class that configures a model with prediction data capture to capture the numerical prediction responses
* Register the linear regression model in MLflow* **domino-mlflow-model-xgboost-imm.ipynb** - a notebook that trains a xgboost classifier model on the Iris dataset and does the following:
* Registers the training data used as a training set
* Creates a pyfunc model wrapper class that configures a model with prediction data capture to capture the categorical prediction responses
* Register the classifier model in MLflow
* **domino-mlflow-model.ipynb** - a notebook that has examples of how to register the following mlflow supported models using a pyfunc model wrapper class:
* Sklearn model with column based inputs
* XGBoost, PyTorch, TensorFlow and custom Pyfunc models with tensor based inputs
See examples of Model API inputs below for each of these models.## Model API
You can test the Model API using the following observation:
### Sklearn - Housing Prices Regression
{
"data": [
[8.3252, 41.0, 6.984127, 1.023810, 322.0, 2.555556, 37.88, -122.23],
[8.3014, 21.0, 6.238137, 0.971880, 2401.0, 2.109842, 37.86, -122.22]
]
}### XGBoost - Iris Classification
{
"data": [
[5.1, 3.5, 1.4, 0.2],
[4.9, 3.0, 1.4, 0.2]
]
}### PyTorch
{
"data": [-1.0568, 1.2518, -0.4604, 1.3156, 0.4191, -0.5685]
}### TensorFlow
{
"data": [
[
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01176471,
0.07058824,
0.07058824,
0.07058824,
0.49411765,
0.53333333,
0.68627451,
0.10196078,
0.65098039,
1,
0.96862745,
0.49803922,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0.11764706,
0.14117647,
0.36862745,
0.60392157,
0.66666667,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.88235294,
0.6745098,
0.99215686,
0.94901961,
0.76470588,
0.25098039,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0.19215686,
0.93333333,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.98431373,
0.36470588,
0.32156863,
0.32156863,
0.21960784,
0.15294118,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0.07058824,
0.85882353,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.77647059,
0.71372549,
0.96862745,
0.94509804,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0.31372549,
0.61176471,
0.41960784,
0.99215686,
0.99215686,
0.80392157,
0.04313725,
0,
0.16862745,
0.60392157,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.05490196,
0.00392157,
0.60392157,
0.99215686,
0.35294118,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.54509804,
0.99215686,
0.74509804,
0.00784314,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.04313725,
0.74509804,
0.99215686,
0.2745098,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.1372549,
0.94509804,
0.88235294,
0.62745098,
0.42352941,
0.00392157,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.31764706,
0.94117647,
0.99215686,
0.99215686,
0.46666667,
0.09803922,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.17647059,
0.72941176,
0.99215686,
0.99215686,
0.58823529,
0.10588235,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0627451,
0.36470588,
0.98823529,
0.99215686,
0.73333333,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.97647059,
0.99215686,
0.97647059,
0.25098039,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.18039216,
0.50980392,
0.71764706,
0.99215686,
0.99215686,
0.81176471,
0.00784314,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.15294118,
0.58039216,
0.89803922,
0.99215686,
0.99215686,
0.99215686,
0.98039216,
0.71372549,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.09411765,
0.44705882,
0.86666667,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.78823529,
0.30588235,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0.09019608,
0.25882353,
0.83529412,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.77647059,
0.31764706,
0.00784314,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0.07058824,
0.67058824,
0.85882353,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.76470588,
0.31372549,
0.03529412,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0.21568627,
0.6745098,
0.88627451,
0.99215686,
0.99215686,
0.99215686,
0.99215686,
0.95686275,
0.52156863,
0.04313725,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0.53333333,
0.99215686,
0.99215686,
0.99215686,
0.83137255,
0.52941176,
0.51764706,
0.0627451,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
]
]
}