createModelExplainabilityJobDefinition method
- required String jobDefinitionName,
- required MonitoringResources jobResources,
- required ModelExplainabilityAppSpecification modelExplainabilityAppSpecification,
- required ModelExplainabilityJobInput modelExplainabilityJobInput,
- required MonitoringOutputConfig modelExplainabilityJobOutputConfig,
- required String roleArn,
- ModelExplainabilityBaselineConfig? modelExplainabilityBaselineConfig,
- MonitoringNetworkConfig? networkConfig,
- MonitoringStoppingCondition? stoppingCondition,
- List<
Tag> ? tags,
Creates the definition for a model explainability job.
May throw ResourceLimitExceeded. May throw ResourceInUse.
Parameter jobDefinitionName
:
The name of the model explainability job definition. The name must be
unique within an AWS Region in the AWS account.
Parameter modelExplainabilityAppSpecification
:
Configures the model explainability job to run a specified Docker
container image.
Parameter modelExplainabilityJobInput
:
Inputs for the model explainability job.
Parameter roleArn
:
The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can
assume to perform tasks on your behalf.
Parameter modelExplainabilityBaselineConfig
:
The baseline configuration for a model explainability job.
Parameter networkConfig
:
Networking options for a model explainability job.
Parameter tags
:
(Optional) An array of key-value pairs. For more information, see Using
Cost Allocation Tags in the AWS Billing and Cost Management User
Guide.
Implementation
Future<CreateModelExplainabilityJobDefinitionResponse>
createModelExplainabilityJobDefinition({
required String jobDefinitionName,
required MonitoringResources jobResources,
required ModelExplainabilityAppSpecification
modelExplainabilityAppSpecification,
required ModelExplainabilityJobInput modelExplainabilityJobInput,
required MonitoringOutputConfig modelExplainabilityJobOutputConfig,
required String roleArn,
ModelExplainabilityBaselineConfig? modelExplainabilityBaselineConfig,
MonitoringNetworkConfig? networkConfig,
MonitoringStoppingCondition? stoppingCondition,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(jobDefinitionName, 'jobDefinitionName');
_s.validateStringLength(
'jobDefinitionName',
jobDefinitionName,
1,
63,
isRequired: true,
);
ArgumentError.checkNotNull(jobResources, 'jobResources');
ArgumentError.checkNotNull(modelExplainabilityAppSpecification,
'modelExplainabilityAppSpecification');
ArgumentError.checkNotNull(
modelExplainabilityJobInput, 'modelExplainabilityJobInput');
ArgumentError.checkNotNull(modelExplainabilityJobOutputConfig,
'modelExplainabilityJobOutputConfig');
ArgumentError.checkNotNull(roleArn, 'roleArn');
_s.validateStringLength(
'roleArn',
roleArn,
20,
2048,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreateModelExplainabilityJobDefinition'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'JobDefinitionName': jobDefinitionName,
'JobResources': jobResources,
'ModelExplainabilityAppSpecification':
modelExplainabilityAppSpecification,
'ModelExplainabilityJobInput': modelExplainabilityJobInput,
'ModelExplainabilityJobOutputConfig':
modelExplainabilityJobOutputConfig,
'RoleArn': roleArn,
if (modelExplainabilityBaselineConfig != null)
'ModelExplainabilityBaselineConfig':
modelExplainabilityBaselineConfig,
if (networkConfig != null) 'NetworkConfig': networkConfig,
if (stoppingCondition != null) 'StoppingCondition': stoppingCondition,
if (tags != null) 'Tags': tags,
},
);
return CreateModelExplainabilityJobDefinitionResponse.fromJson(
jsonResponse.body);
}