Skip to content

/AWS1/CL_SGMCLARIFYINFERENCE00

The inference configuration parameter for the model container.

CONSTRUCTOR

IMPORTING

Optional arguments:

iv_featuresattribute TYPE /AWS1/SGMCLARIFYFEATURESATTR /AWS1/SGMCLARIFYFEATURESATTR

Provides the JMESPath expression to extract the features from a model container input in JSON Lines format. For example, if FeaturesAttribute is the JMESPath expression 'myfeatures', it extracts a list of features [1,2,3] from request data '{"myfeatures":[1,2,3]}'.

iv_contenttemplate TYPE /AWS1/SGMCLARIFYCONTENTTMPL /AWS1/SGMCLARIFYCONTENTTMPL

A template string used to format a JSON record into an acceptable model container input. For example, a ContentTemplate string '{"myfeatures":$features}' will format a list of features [1,2,3] into the record string '{"myfeatures":[1,2,3]}'. Required only when the model container input is in JSON Lines format.

iv_maxrecordcount TYPE /AWS1/SGMCLARIFYMAXRECORDCOUNT /AWS1/SGMCLARIFYMAXRECORDCOUNT

The maximum number of records in a request that the model container can process when querying the model container for the predictions of a synthetic dataset. A record is a unit of input data that inference can be made on, for example, a single line in CSV data. If MaxRecordCount is 1, the model container expects one record per request. A value of 2 or greater means that the model expects batch requests, which can reduce overhead and speed up the inferencing process. If this parameter is not provided, the explainer will tune the record count per request according to the model container's capacity at runtime.

iv_maxpayloadinmb TYPE /AWS1/SGMCLARIFYMAXPAYLOADINMB /AWS1/SGMCLARIFYMAXPAYLOADINMB

The maximum payload size (MB) allowed of a request from the explainer to the model container. Defaults to 6 MB.

iv_probabilityindex TYPE /AWS1/SGMCLARIFYPROBABILITYIDX /AWS1/SGMCLARIFYPROBABILITYIDX

A zero-based index used to extract a probability value (score) or list from model container output in CSV format. If this value is not provided, the entire model container output will be treated as a probability value (score) or list.

Example for a single class model: If the model container output consists of a string-formatted prediction label followed by its probability: '1,0.6', set ProbabilityIndex to 1 to select the probability value 0.6.

Example for a multiclass model: If the model container output consists of a string-formatted prediction label followed by its probability: '"[\'cat\',\'dog\',\'fish\']","[0.1,0.6,0.3]"', set ProbabilityIndex to 1 to select the probability values [0.1,0.6,0.3].

iv_labelindex TYPE /AWS1/SGMCLARIFYLABELINDEX /AWS1/SGMCLARIFYLABELINDEX

A zero-based index used to extract a label header or list of label headers from model container output in CSV format.

Example for a multiclass model: If the model container output consists of label headers followed by probabilities: '"[\'cat\',\'dog\',\'fish\']","[0.1,0.6,0.3]"', set LabelIndex to 0 to select the label headers ['cat','dog','fish'].

iv_probabilityattribute TYPE /AWS1/SGMCLARIFYPROBABILITYA00 /AWS1/SGMCLARIFYPROBABILITYA00

A JMESPath expression used to extract the probability (or score) from the model container output if the model container is in JSON Lines format.

Example: If the model container output of a single request is '{"predicted_label":1,"probability":0.6}', then set ProbabilityAttribute to 'probability'.

iv_labelattribute TYPE /AWS1/SGMCLARIFYLABELATTRIBUTE /AWS1/SGMCLARIFYLABELATTRIBUTE

A JMESPath expression used to locate the list of label headers in the model container output.

Example: If the model container output of a batch request is '{"labels":["cat","dog","fish"],"probability":[0.6,0.3,0.1]}', then set LabelAttribute to 'labels' to extract the list of label headers ["cat","dog","fish"]

it_labelheaders TYPE /AWS1/CL_SGMCLARIFYLABELHEAD00=>TT_CLARIFYLABELHEADERS TT_CLARIFYLABELHEADERS

For multiclass classification problems, the label headers are the names of the classes. Otherwise, the label header is the name of the predicted label. These are used to help readability for the output of the InvokeEndpoint API. See the response section under Invoke the endpoint in the Developer Guide for more information. If there are no label headers in the model container output, provide them manually using this parameter.

it_featureheaders TYPE /AWS1/CL_SGMCLARIFYFTHEADERS_W=>TT_CLARIFYFEATUREHEADERS TT_CLARIFYFEATUREHEADERS

The names of the features. If provided, these are included in the endpoint response payload to help readability of the InvokeEndpoint output. See the Response section under Invoke the endpoint in the Developer Guide for more information.

it_featuretypes TYPE /AWS1/CL_SGMCLARIFYFEATTYPES_W=>TT_CLARIFYFEATURETYPES TT_CLARIFYFEATURETYPES

A list of data types of the features (optional). Applicable only to NLP explainability. If provided, FeatureTypes must have at least one 'text' string (for example, ['text']). If FeatureTypes is not provided, the explainer infers the feature types based on the baseline data. The feature types are included in the endpoint response payload. For additional information see the response section under Invoke the endpoint in the Developer Guide for more information.


Queryable Attributes

FeaturesAttribute

Provides the JMESPath expression to extract the features from a model container input in JSON Lines format. For example, if FeaturesAttribute is the JMESPath expression 'myfeatures', it extracts a list of features [1,2,3] from request data '{"myfeatures":[1,2,3]}'.

Accessible with the following methods

Method Description
GET_FEATURESATTRIBUTE() Getter for FEATURESATTRIBUTE, with configurable default
ASK_FEATURESATTRIBUTE() Getter for FEATURESATTRIBUTE w/ exceptions if field has no v
HAS_FEATURESATTRIBUTE() Determine if FEATURESATTRIBUTE has a value

ContentTemplate

A template string used to format a JSON record into an acceptable model container input. For example, a ContentTemplate string '{"myfeatures":$features}' will format a list of features [1,2,3] into the record string '{"myfeatures":[1,2,3]}'. Required only when the model container input is in JSON Lines format.

Accessible with the following methods

Method Description
GET_CONTENTTEMPLATE() Getter for CONTENTTEMPLATE, with configurable default
ASK_CONTENTTEMPLATE() Getter for CONTENTTEMPLATE w/ exceptions if field has no val
HAS_CONTENTTEMPLATE() Determine if CONTENTTEMPLATE has a value

MaxRecordCount

The maximum number of records in a request that the model container can process when querying the model container for the predictions of a synthetic dataset. A record is a unit of input data that inference can be made on, for example, a single line in CSV data. If MaxRecordCount is 1, the model container expects one record per request. A value of 2 or greater means that the model expects batch requests, which can reduce overhead and speed up the inferencing process. If this parameter is not provided, the explainer will tune the record count per request according to the model container's capacity at runtime.

Accessible with the following methods

Method Description
GET_MAXRECORDCOUNT() Getter for MAXRECORDCOUNT, with configurable default
ASK_MAXRECORDCOUNT() Getter for MAXRECORDCOUNT w/ exceptions if field has no valu
HAS_MAXRECORDCOUNT() Determine if MAXRECORDCOUNT has a value

MaxPayloadInMB

The maximum payload size (MB) allowed of a request from the explainer to the model container. Defaults to 6 MB.

Accessible with the following methods

Method Description
GET_MAXPAYLOADINMB() Getter for MAXPAYLOADINMB, with configurable default
ASK_MAXPAYLOADINMB() Getter for MAXPAYLOADINMB w/ exceptions if field has no valu
HAS_MAXPAYLOADINMB() Determine if MAXPAYLOADINMB has a value

ProbabilityIndex

A zero-based index used to extract a probability value (score) or list from model container output in CSV format. If this value is not provided, the entire model container output will be treated as a probability value (score) or list.

Example for a single class model: If the model container output consists of a string-formatted prediction label followed by its probability: '1,0.6', set ProbabilityIndex to 1 to select the probability value 0.6.

Example for a multiclass model: If the model container output consists of a string-formatted prediction label followed by its probability: '"[\'cat\',\'dog\',\'fish\']","[0.1,0.6,0.3]"', set ProbabilityIndex to 1 to select the probability values [0.1,0.6,0.3].

Accessible with the following methods

Method Description
GET_PROBABILITYINDEX() Getter for PROBABILITYINDEX, with configurable default
ASK_PROBABILITYINDEX() Getter for PROBABILITYINDEX w/ exceptions if field has no va
HAS_PROBABILITYINDEX() Determine if PROBABILITYINDEX has a value

LabelIndex

A zero-based index used to extract a label header or list of label headers from model container output in CSV format.

Example for a multiclass model: If the model container output consists of label headers followed by probabilities: '"[\'cat\',\'dog\',\'fish\']","[0.1,0.6,0.3]"', set LabelIndex to 0 to select the label headers ['cat','dog','fish'].

Accessible with the following methods

Method Description
GET_LABELINDEX() Getter for LABELINDEX, with configurable default
ASK_LABELINDEX() Getter for LABELINDEX w/ exceptions if field has no value
HAS_LABELINDEX() Determine if LABELINDEX has a value

ProbabilityAttribute

A JMESPath expression used to extract the probability (or score) from the model container output if the model container is in JSON Lines format.

Example: If the model container output of a single request is '{"predicted_label":1,"probability":0.6}', then set ProbabilityAttribute to 'probability'.

Accessible with the following methods

Method Description
GET_PROBABILITYATTRIBUTE() Getter for PROBABILITYATTRIBUTE, with configurable default
ASK_PROBABILITYATTRIBUTE() Getter for PROBABILITYATTRIBUTE w/ exceptions if field has n
HAS_PROBABILITYATTRIBUTE() Determine if PROBABILITYATTRIBUTE has a value

LabelAttribute

A JMESPath expression used to locate the list of label headers in the model container output.

Example: If the model container output of a batch request is '{"labels":["cat","dog","fish"],"probability":[0.6,0.3,0.1]}', then set LabelAttribute to 'labels' to extract the list of label headers ["cat","dog","fish"]

Accessible with the following methods

Method Description
GET_LABELATTRIBUTE() Getter for LABELATTRIBUTE, with configurable default
ASK_LABELATTRIBUTE() Getter for LABELATTRIBUTE w/ exceptions if field has no valu
HAS_LABELATTRIBUTE() Determine if LABELATTRIBUTE has a value

LabelHeaders

For multiclass classification problems, the label headers are the names of the classes. Otherwise, the label header is the name of the predicted label. These are used to help readability for the output of the InvokeEndpoint API. See the response section under Invoke the endpoint in the Developer Guide for more information. If there are no label headers in the model container output, provide them manually using this parameter.

Accessible with the following methods

Method Description
GET_LABELHEADERS() Getter for LABELHEADERS, with configurable default
ASK_LABELHEADERS() Getter for LABELHEADERS w/ exceptions if field has no value
HAS_LABELHEADERS() Determine if LABELHEADERS has a value

FeatureHeaders

The names of the features. If provided, these are included in the endpoint response payload to help readability of the InvokeEndpoint output. See the Response section under Invoke the endpoint in the Developer Guide for more information.

Accessible with the following methods

Method Description
GET_FEATUREHEADERS() Getter for FEATUREHEADERS, with configurable default
ASK_FEATUREHEADERS() Getter for FEATUREHEADERS w/ exceptions if field has no valu
HAS_FEATUREHEADERS() Determine if FEATUREHEADERS has a value

FeatureTypes

A list of data types of the features (optional). Applicable only to NLP explainability. If provided, FeatureTypes must have at least one 'text' string (for example, ['text']). If FeatureTypes is not provided, the explainer infers the feature types based on the baseline data. The feature types are included in the endpoint response payload. For additional information see the response section under Invoke the endpoint in the Developer Guide for more information.

Accessible with the following methods

Method Description
GET_FEATURETYPES() Getter for FEATURETYPES, with configurable default
ASK_FEATURETYPES() Getter for FEATURETYPES w/ exceptions if field has no value
HAS_FEATURETYPES() Determine if FEATURETYPES has a value