deploy | autoML | teradataml - deploy - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
December 2024
ft:locale
en-US
ft:lastEdition
2025-01-23
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Use the deploy() function to save models to the specified table.

If 'ranks' is provided, specified models in 'ranks' will be saved and ranks will be reassigned to specified models based on the order of the leaderboard, non-specified models will be ignored.

Raises TeradataMlException.

Required argument:
  • table_name specifies the table name to which the models information is to be saved.

    Types: int

Optional arguments:
  • top_n specifies the top n models to be saved.
    If ranks is not provided, the function saves the top 'top_n' models.

    Default value: 3

    Types: int

  • ranks specifies the ranks for the models to be saved.
    If ranks is provided, then top_n is ignored.

    Types: int or list of int or range object.

Example 1: Create an instance of the AutoML called "obj" by referring "AutoML() or AutoRegressor() or AutoClassifier()" method

>>> obj = AutoML(task_type="Classification")
>>> obj.fit(data = data, target_column = target_column)

Example 2: Save top 3 models to the specified table

>>> obj.deploy("model_table")

Example 3: Save top n models to the specified table

>>> obj.deploy("model_table", top_n=5)

Example 4: Save models based on specified ranks to the specified table

>>> obj.deploy("model_table", ranks=[1, 3, 5])

Example 5: Save models based on specified rank range to the specified table

>>> obj.deploy("model_table", ranks=range(2,6))