Teradata Package for Python Function Reference on VantageCloud Lake - deploy: Deploy externally trained sklearn model - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
20.00.00.11
Publication Date
August 2026
Content Type
Programming Reference
Publication ID
B700-4500-200K
ft:locale
en-US
ft:lastEdition
2026-08-13
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.opensource.td_sklearn.deploy = deploy(model_name, model, replace_if_exists=False)
DESCRIPTION:
    Deploys the model to Vantage.
 
PARAMETERS:
    model_name:
        Required Argument.
        Specifies the unique name of the model to be deployed.
        Types: str
 
    model:
        Required Argument.
        Specifies the teradataml supported opensource model object that is to be deployed.
        Currently supported models are:
            - sklearn
            - lightgbm
        Types: object
 
    replace_if_exists:
        Optional Argument.
        Specifies whether to replace the model if a model with the same name already
        exists in Vantage. If this argument is set to False and a model with the same
        name already exists, then the function raises an exception.
        Default Value: False
        Types: bool
 
RETURNS:
    The opensource object wrapper.
 
RAISES:
    TeradataMLException if model with "model_name" already exists and the argument
    "replace_if_exists" is set to False.
 
EXAMPLES:
    # Import required packages and create LinearRegression sklearn object.
    >>> from teradataml import td_sklearn
    >>> from sklearn.linear_model import LinearRegression
    >>> model = LinearRegression(normalize=True)
 
    # Example 1: Deploy the model to Vantage.
    >>> lin_reg = td_sklearn.deploy("linreg_model_ver_1", model)
    Model is saved.
    >>> lin_reg
    LinearRegression(normalize=True)
 
    # Example 2: Deploy the model to Vantage with the name same as that of model that
    #            already existed in Vantage.
    >>> lin_reg = td_sklearn.deploy("linreg_model_ver_1", model, replace_if_exists=True)
    Model is deleted.
    Model is saved.
    >>> lin_reg
    LinearRegression(normalize=True)