Teradata Package for Python Function Reference on VantageCloud Lake - _LightgbmSklearnWrapper.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._lightgbm._LightgbmSklearnWrapper.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:
    # Import the required libraries and create LGBMClassifier Opensource object wrapper.
    >>> from teradataml import td_lightgbm
    >>> model = td_lightgbm.LGBMClassifier()
    >>> model
    LGBMClassifier()
 
    # Example 1: Deploy the model held by LGBMClassifier Opensource object to Vantage.
    >>> lgbm_cls = model.deploy("lgbm_cls_model_ver_2")
    Model is saved.
    >>> lgbm_cls
    LGBMClassifier()
 
    # Example 2: Deploy the model held by LGBMClassifier Opensource object to Vantage with
    #            the name same as that of model that already existed in Vantage.
    >>> lgbm_cls = model.deploy("lgbm_cls_model_ver_2", replace_if_exists=True)
    Model is deleted.
    Model is saved.
    >>> lgbm_cls
    LGBMClassifier()