Teradata Package for Python Function Reference on VantageCloud Lake - deploy - 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.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.opensource.sklearn._sklearn_wrapper._OpenSourceObjectWrapper.deploy = deploy(self, model_name, replace_if_exists=False)
DESCRIPTION:
    Deploys the model held by interface object to Vantage.
 
PARAMETERS:
    model_name:
        Required Argument.
        Specifies the unique name of the model to be deployed.
        Types: str
 
    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:
    >>> from teradataml import td_sklearn
    >>> model = td_sklearn.LinearRegression(normalize=True)
    >>> model
    LinearRegression(normalize=True)
 
    # Example 1: Deploy the model held by interface object to Vantage.
    >>> lin_reg = model.deploy("linreg_model_ver_2")
    Model is saved.
    >>> lin_reg
    LinearRegression(normalize=True)
 
    # Example 2: Deploy the model held by interface object to Vantage with the name same
    #            as that of model that already existed in Vantage.
    >>> lin_reg = model.deploy("linreg_model_ver_2", replace_if_exists=True)
    Model is deleted.
    Model is saved.
    >>> lin_reg
    LinearRegression(normalize=True)