TDApiClient .fit Method | teradataml AWS Extension Library |API Integration - TDApiClient.fit Method - Teradata Vantage

Teradata Vantageā„¢ - API Integration Guide for Cloud Machine Learning

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Vantage
Release Number
1.4
Published
September 2023
Language
English (United States)
Last Update
2023-09-28
dita:mapPath
mgu1643999543506.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
mgu1643999543506

This wrapper function execute the SageMaker.fit method of Amazon SageMaker using the teradataml DataFrame as source for training.

The fit method copies the data to S3 and then invokes any of the AWS Python API's callable through tdapiclient, as listed in teradataml Extension.

Required Argument:
  • inputs: Specifies a teradataml DataFrame or S3 path as a string.
    It can be one of the following:
    • Single object of teradataml DataFrame
    • String
    • Dictionary of string to object of teradataml DataFrame
Optional Arguments:
  • content_type: Specifies the content type for inputs.

    Default value is CSV.

  • convert_at_local_node: Specifies whether to automatically download Parquet data from S3, convert it to JSON at client, and upload the result to S3.

    This setting is ignored when content_type is not JSON.

    The Default Value is False.

  • **sg_kw_args: Specifies any additional argument required for SageMaker.fit. These parameters are directly supplied to SageMaker.fit method.

Example

from tdapiclient import create_tdapi_context, TDApiClient
context = create_tdapi_context("aws", "s3_bucket")
tdapiclient = TDApiClient(context)
# SKlearn takes all parameters that AWS SageMaker Library requires
skLearnObject = tdapiclient.SKLearn()
train = DataFrame(tableName='train_data')
test = DataFrame(tableName='test_data')
skLearnObject.fit(inputs={'train': train, 'test': test},
                        content_type='csv', wait=False)