ModelOps - Import and Deploy your first BYOM Model

Author: Pablo Escobar de la Oliva
Last updated: October 5th, 2022


This is a quickstart tutorial for people who are new to Vantage ModelOps. In the tutorial, you will be able to create a new project in ModelOps, upload the required data to Vantage, and track the full lifecycle of an imported Diabetes demo model using BYOM mechanisms.


  • Access to a Teradata Vantage instance with ClearScape Analytics (includes ModelOps)

  • Ability to run Jupyter notebooks

If you need a new instance of Vantage, you can install a free version called Vantage Express in the cloud on Google Cloud, Azure, and AWS. You can also run Vantage Express on your local machine using VMware, VirtualBox, or UTM.

Files needed

Let’s start by downloading the needed files for this tutorial. Download these 4 attachments and upload them in your Notebook filesystem.

Alternatively you can git clone following repos

git clone
git clone

Setting up the Database and Jupyter environment

Follow the ModelOps_Training Jupyter Notebook to setup the database, tables and libraries needed for the demo.

Understand where we are in the Methodology

ModelOps Methodology BYOM screenshot

Create a new Project or use an existing one

Add a new Project

Here you can test the git connection. If is green then save and continue. Skip the service connection settings for now.

When creating a new project, ModelOps will ask you for a new connection.

Create a Personal Connection

Personal connection

  • Name: Vantage personal your-name

  • Description: Vantage demo env

  • Host: (internal for teradata transcend only)

  • Database: your-db

  • VAL Database: TRNG_XSP (internal for teradata transcend only)

  • BYOM Database: TRNG_BYOM (internal for teradata transcend only)

  • Login Mech: TDNEGO

  • Username/Password

Validate permissions in SQL database for VAL and BYOM

You can check the permissions with the new healthcheck panel in the connections panel

ModelOps Healtcheck screenshot

Add dataset to identify Vantage tables for BYOM evaluation and scoring

Let’s create a new dataset template, then 1 dataset for training and 2 datasets for evaluation so we can monitor model quality metrics with 2 different datasets

Add datasets

  • create dataset template

  • Catalog

  • Name: PIMA

  • Description: PIMA Diabetes

  • Feature Catalog: Vantage

  • Database: your-db

  • Table: aoa_feature_metadata

Features Query:

SELECT * FROM {your-db}.pima_patient_features

Entity Key: PatientId Features: NumTimesPrg, PlGlcConc, BloodP, SkinThick, TwoHourSerIns, BMI, DiPedFunc, Age

Entity & Target Query:

SELECT * FROM {your-db}.pima_patient_diagnoses

Entity Key: PatientId Target: HasDiabetes


  • Database: your-db

  • Table: pima_patient_predictions

Entity selection:


SELECT * FROM pima_patient_features WHERE patientid MOD 5 = 0

BYOM Target Column: CAST(CAST(json_report AS JSON).JSONExtractValue('$.predicted_HasDiabetes') AS INT)

Create training dataset


  • Name: Train

  • Description: Training dataset

  • Scope: Training

  • Entity & Target


SELECT * FROM {your-db}.pima_patient_diagnoses WHERE patientid MOD 5 = 1

Create evaluation dataset 1


  • Name: Evaluate

  • Description: Evaluation dataset

  • Scope: Evaluation

  • Entity & Target


SELECT * FROM {your-db}.pima_patient_diagnoses WHERE patientid MOD 5 = 2

Create evaluation dataset 2


  • Name: Evaluate

  • Description: Evaluation dataset

  • Scope: Evaluation

  • Entity & Target


SELECT * FROM {your-db}.pima_patient_diagnoses WHERE patientid MOD 5 = 3

Model Lifecycle for a new BYOM

Download and unzip the files needed, links are at the top of the tutorial. For PMML file you can also download a PMML generated in the training of a GIT model.

  • BYOM.ipynb

  • model.pmml

  • requirements.txt


  • data_stats.json


Define BYOM Model with Evaluation and Monitoring

  • Import Version

  • Evaluate

  • Review evaluation report, including dataset statistics

  • Approve

  • Deploy in Vantage - Engine, Publish, Schedule. Scoring dataset is required Use your connection and select a database. e.g "aoa_byom_models"

  • Deployments/executions

  • Evaluate again with dataset2 - to monitor model metrics behavior

  • Monitor Model Drift - Data and Metrics

  • Open BYOM notebook to execute the PMML predict from SQL code

  • Retire


In this quick start we have learned how to follow a full lifecycle of BYOM models into ModelOps and how to deploy it into Vantage. Then how we can schedule a batch scoring or test restful or on-demand scorings and start monitoring on Data Drift and Model Quality metrics.

Did this page help?