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)