ExplainerConfigProperty Struct
A parameter to activate explainers.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const explainerConfigProperty: sagemaker.CfnEndpointConfig.ExplainerConfigProperty = {
clarifyExplainerConfig: {
shapConfig: {
shapBaselineConfig: {
mimeType: 'mimeType',
shapBaseline: 'shapBaseline',
shapBaselineUri: 'shapBaselineUri',
},
// the properties below are optional
numberOfSamples: 123,
seed: 123,
textConfig: {
granularity: 'granularity',
language: 'language',
},
useLogit: false,
},
// the properties below are optional
enableExplanations: 'enableExplanations',
inferenceConfig: {
contentTemplate: 'contentTemplate',
featureHeaders: ['featureHeaders'],
featuresAttribute: 'featuresAttribute',
featureTypes: ['featureTypes'],
labelAttribute: 'labelAttribute',
labelHeaders: ['labelHeaders'],
labelIndex: 123,
maxPayloadInMb: 123,
maxRecordCount: 123,
probabilityAttribute: 'probabilityAttribute',
probabilityIndex: 123,
},
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker
explainer_config_property = sagemaker.CfnEndpointConfig.ExplainerConfigProperty(
clarify_explainer_config=sagemaker.CfnEndpointConfig.ClarifyExplainerConfigProperty(
shap_config=sagemaker.CfnEndpointConfig.ClarifyShapConfigProperty(
shap_baseline_config=sagemaker.CfnEndpointConfig.ClarifyShapBaselineConfigProperty(
mime_type="mimeType",
shap_baseline="shapBaseline",
shap_baseline_uri="shapBaselineUri"
),
# the properties below are optional
number_of_samples=123,
seed=123,
text_config=sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty(
granularity="granularity",
language="language"
),
use_logit=False
),
# the properties below are optional
enable_explanations="enableExplanations",
inference_config=sagemaker.CfnEndpointConfig.ClarifyInferenceConfigProperty(
content_template="contentTemplate",
feature_headers=["featureHeaders"],
features_attribute="featuresAttribute",
feature_types=["featureTypes"],
label_attribute="labelAttribute",
label_headers=["labelHeaders"],
label_index=123,
max_payload_in_mb=123,
max_record_count=123,
probability_attribute="probabilityAttribute",
probability_index=123
)
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;
ExplainerConfigProperty explainerConfigProperty = ExplainerConfigProperty.builder()
.clarifyExplainerConfig(ClarifyExplainerConfigProperty.builder()
.shapConfig(ClarifyShapConfigProperty.builder()
.shapBaselineConfig(ClarifyShapBaselineConfigProperty.builder()
.mimeType("mimeType")
.shapBaseline("shapBaseline")
.shapBaselineUri("shapBaselineUri")
.build())
// the properties below are optional
.numberOfSamples(123)
.seed(123)
.textConfig(ClarifyTextConfigProperty.builder()
.granularity("granularity")
.language("language")
.build())
.useLogit(false)
.build())
// the properties below are optional
.enableExplanations("enableExplanations")
.inferenceConfig(ClarifyInferenceConfigProperty.builder()
.contentTemplate("contentTemplate")
.featureHeaders(List.of("featureHeaders"))
.featuresAttribute("featuresAttribute")
.featureTypes(List.of("featureTypes"))
.labelAttribute("labelAttribute")
.labelHeaders(List.of("labelHeaders"))
.labelIndex(123)
.maxPayloadInMb(123)
.maxRecordCount(123)
.probabilityAttribute("probabilityAttribute")
.probabilityIndex(123)
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;
var explainerConfigProperty = new ExplainerConfigProperty {
ClarifyExplainerConfig = new ClarifyExplainerConfigProperty {
ShapConfig = new ClarifyShapConfigProperty {
ShapBaselineConfig = new ClarifyShapBaselineConfigProperty {
MimeType = "mimeType",
ShapBaseline = "shapBaseline",
ShapBaselineUri = "shapBaselineUri"
},
// the properties below are optional
NumberOfSamples = 123,
Seed = 123,
TextConfig = new ClarifyTextConfigProperty {
Granularity = "granularity",
Language = "language"
},
UseLogit = false
},
// the properties below are optional
EnableExplanations = "enableExplanations",
InferenceConfig = new ClarifyInferenceConfigProperty {
ContentTemplate = "contentTemplate",
FeatureHeaders = new [] { "featureHeaders" },
FeaturesAttribute = "featuresAttribute",
FeatureTypes = new [] { "featureTypes" },
LabelAttribute = "labelAttribute",
LabelHeaders = new [] { "labelHeaders" },
LabelIndex = 123,
MaxPayloadInMb = 123,
MaxRecordCount = 123,
ProbabilityAttribute = "probabilityAttribute",
ProbabilityIndex = 123
}
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
explainerConfigProperty := &ExplainerConfigProperty{
ClarifyExplainerConfig: &ClarifyExplainerConfigProperty{
ShapConfig: &ClarifyShapConfigProperty{
ShapBaselineConfig: &ClarifyShapBaselineConfigProperty{
MimeType: jsii.String("mimeType"),
ShapBaseline: jsii.String("shapBaseline"),
ShapBaselineUri: jsii.String("shapBaselineUri"),
},
// the properties below are optional
NumberOfSamples: jsii.Number(123),
Seed: jsii.Number(123),
TextConfig: &ClarifyTextConfigProperty{
Granularity: jsii.String("granularity"),
Language: jsii.String("language"),
},
UseLogit: jsii.Boolean(false),
},
// the properties below are optional
EnableExplanations: jsii.String("enableExplanations"),
InferenceConfig: &ClarifyInferenceConfigProperty{
ContentTemplate: jsii.String("contentTemplate"),
FeatureHeaders: []*string{
jsii.String("featureHeaders"),
},
FeaturesAttribute: jsii.String("featuresAttribute"),
FeatureTypes: []*string{
jsii.String("featureTypes"),
},
LabelAttribute: jsii.String("labelAttribute"),
LabelHeaders: []*string{
jsii.String("labelHeaders"),
},
LabelIndex: jsii.Number(123),
MaxPayloadInMb: jsii.Number(123),
MaxRecordCount: jsii.Number(123),
ProbabilityAttribute: jsii.String("probabilityAttribute"),
ProbabilityIndex: jsii.Number(123),
},
},
}
Properties
clarifyExplainerConfigoptionalIResolvable | CfnEndpointConfig.clarify_explainer_configoptionaltyping.Union[IResolvable, ClarifyExplainerConfigProperty]clarifyExplainerConfigoptionalIResolvableClarifyExplainerConfigoptionalIResolvableClarifyExplainerConfigoptionalinterface{} #A member of `ExplainerConfig` that contains configuration parameters for the SageMaker Clarify explainer.