TDAzurePredictor.from_predictor | teradataml Azure Extension | API Integration - TDAzurePredictor.from_predictor Method - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Use the TDAzurePredictor.from_predictor method to create TDAzurePredictor from the AciWebservice object to allow for prediction using teradataml DataFrame and Azure Machine Learning endpoint represented by this predictor object.

Required Arguments:
  • azureml_predictor_obj: Specifies the instance of AciWebservice class.
  • tdapi_context: Specifies the TDAPI context object holding Azure credentials information.

Example

from tdapiclient import TDPredictor, create_tdapi_context
context = create_tdapi_context("azure", "/td-tables")
tdapiclient = TDApiClient(context)
# Script run config takes all the parameters as
    # required by azure-ml script run config
skLearnObject = tdapiclient.ScriptRunConfig() # This call refers to _init_ call above.
train = DataFrame(tableName='train_data')
skLearnObject.fit(mount=True)
tdsg_predictor = _TDAzurePredictor.from_predictor(skLearnObject, context)