Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - uninstall_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
17.20
Publication Date
November 2022
Content Type
Programming Reference
Publication ID
B700-4500-112K
ft:locale
en-US
ft:lastEdition
2024-02-21
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_1720
Product Category
Teradata Vantage
teradataml.scriptmgmt.UserEnv.UserEnv.uninstall_model = uninstall_model(self, model_name, **kwargs)
DESCRIPTION:
    Function uninstalls the specified model from the
    user environment.
 
PARAMETERS:
    model_name:
        Required Argument.
        Specifies the name of the model to be uninstalled.
        Types: str
 
**kwargs:
    Specifies the keyword arguments.
        suppress_output:
            Optional Argument.
            Specifies whether to print the output message or not.
            When set to True, then the output message is not printed.
            Types: bool
 
RETURNS:
    True, if the operation is successful.
 
RAISES:
    TeradataMlException, RuntimeError
 
EXAMPLES:
    # Create a Python_3.8.13 environment with given name and description in Vantage.
    >>> env = create_env("test_env", "python_3.8.13", "Test environment")
    User environment 'test_env' created.
 
    # User should create a zip file containing all files related to model
    # and use path to that zip file to install model using install_model()
    # API. Let's assume that all models files are zipped under 'large_model.zip'
    >>> model = 'large_model.zip'
 
    # Install the model in the 'test_env' environment.
    >>> env.install_model(model_path = model)
    Request for install_model is completed successfully.
                                   Claim Id  File/Libs/Model    Method Name               Stage             Timestamp  Additional Details
    0  766423af-7cc4-46db-8ee2-b6b5ded299c6  large_model.zip  install_model  Endpoint Generated  2023-11-09T09:21:24Z
    1  766423af-7cc4-46db-8ee2-b6b5ded299c6  large_model.zip  install_model       File Uploaded  2023-11-09T09:22:28Z
    2  766423af-7cc4-46db-8ee2-b6b5ded299c6  large_model.zip  install_model      File Installed  2023-11-09T09:22:30Z
 
    # List models.
    >>> env.models
             Model  Size             Timestamp
    0  large_model  6144  2023-11-09T09:22:30Z
 
    # Example 1: Uninstall model from remote user environment.
    >>> env.uninstall_model('large_model')
    Model 'large_model' uninstalled successfully from the remote user environment 'test_env'.
    True
 
    # Verify the uninstallation of model.
    >>> env.models
    No models found in remote user environment test_env.