You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module creates SageMaker Model Monitoring jobs for (optionally) data quality, model quality,
6
-
model bias, and model explainability. It requires a deployed model endpoint and the proper check steps
7
-
for each monitoring job:
5
+
This module creates SageMaker Model Monitoring jobs and monitoring schedules for (optionally)
6
+
data quality, model quality, model bias, and model explainability. It requires a deployed model
7
+
endpoint with data capture enabled.
8
8
9
-
* Data Quality: [QualityCheck step](https://docs.aws.amazon.com/sagemaker/latest/dg/build-and-manage-steps.html#step-type-quality-check)
10
-
* Model Quality: [QualityCheck step](https://docs.aws.amazon.com/sagemaker/latest/dg/build-and-manage-steps.html#step-type-quality-check)
11
-
* Model Bias: [ClarifyCheck step](https://docs.aws.amazon.com/sagemaker/latest/dg/build-and-manage-steps.html#step-type-clarify-check)
12
-
* Model Explainability: [ClarifyCheck step](https://docs.aws.amazon.com/sagemaker/latest/dg/build-and-manage-steps.html#step-type-clarify-check)
9
+
Available monitoring types:
10
+
11
+
* Data Quality
12
+
* Model Quality
13
+
* Model Bias
14
+
* Model Explainability
13
15
14
16
Note that updating parameters will require replacing resources. Deployments may be delayed until any
15
17
running monitoring jobs complete (and the resources can be destroyed).
@@ -24,83 +26,79 @@ running monitoring jobs complete (and the resources can be destroyed).
24
26
25
27
#### Required
26
28
27
-
-`endpoint-name`: The name of the endpoint used to run the monitoring job.
28
-
-`security-group-id`: The VPC security group IDs, should provide access to the given `subnet-ids`.
29
-
-`subnet-ids`: The ID of the subnets in the VPC to which you want to connect your training job or model.
30
-
-`model-package-arn`: Model package ARN
31
-
-`model-bucket-arn`: S3 bucket ARN for model artifacts
32
-
-`kms-key-id`: The KMS key used to encrypted storage and output.
29
+
-`endpoint_name`: The name of the endpoint used to run the monitoring job. NOTE: The endpoint must have data capture enabled. Data capture location must be in the bucket provided by `model_bucket_arn` parameter below.
30
+
-`model_bucket_arn`: S3 bucket ARN for model, data capture, and monitoring artifacts. Used to provide IAM permissions for monitoring jobs. NOTE: All following S3 URIs must be under this bucket.
33
31
34
32
One or more of:
35
33
36
-
-`enable-data-quality-monitor`: True to enable the data quality monitoring job.
37
-
-`enable-model-quality-monitor`: True to enable the model quality monitoring job.
38
-
-`enable-model-bias-monitor`: True to enable the model bias monitoring job.
39
-
-`enable-model-explainability-monitor`: True to enable the model explainability monitoring job.
34
+
-`enable_data_quality_monitor`: True to enable the data quality monitoring job.
35
+
-`enable_model_quality_monitor`: True to enable the model quality monitoring job.
36
+
-`enable_model_bias_monitor`: True to enable the model bias monitoring job.
37
+
-`enable_model_explainability_monitor`: True to enable the model explainability monitoring job.
40
38
41
39
#### Optional
42
40
43
-
-`sagemaker-project-id`: SageMaker project id
44
-
-`sagemaker-project-name`: SageMaker project name
41
+
-`security_group_id`: The VPC security group IDs, should provide access to the given `subnet_ids`.
42
+
-`subnet_ids`: The ID of the subnets in the VPC to which you want to connect your training job or model.
43
+
-`kms_key_id`: The KMS key used to encrypted storage and output.
44
+
-`sagemaker_project_id`: SageMaker project id
45
+
-`sagemaker_project_name`: SageMaker project name
46
+
-`tags`: Dictionary of tags to apply to resources
45
47
46
48
### Per-job Parameters
47
49
48
-
Each job has prefixed parameters, some of which are required. E.g. if
49
-
`enable-data-quality-monitor` is set to `true`, then the
50
-
`data-quality-checkstep-output-prefix` parameter is required.
51
-
52
-
#### Required
53
-
54
-
-`*-checkstep-output-prefix`: The S3 prefix in `model-artifacts-bucket-arn` which contains the output from the corresponding [Check step in the SageMaker Pipeline](https://docs.aws.amazon.com/sagemaker/latest/dg/build-and-manage-steps.html#build-and-manage-steps-types).
55
-
-`*-output-prefix`: The S3 prefix in `model-artifacts-bucket-arn` to contain the output of the monitoring job.
56
-
57
-
#### Optional
58
-
59
-
-`*-instance-count`: The number of ML compute instances to use in the model monitoring job.
60
-
-`*-instance-type`: The ML compute instance type for the processing job.
61
-
-`*-instance-volume-size-in-gb`: The size of the ML storage volume, in gigabytes, that you want to provision.
62
-
-`*-max-runtime-in-seconds`: The maximum length of time, in seconds, the monitoring job can run before it is stopped.
63
-
-`*-schedule-expression`: A cron expression that describes details about the monitoring schedule.
64
-
65
-
#### Job-specific Parameters
66
-
67
-
See below for the specific input parameters for each model monitoring
68
-
job. These parameters are all required.
69
-
70
-
##### Data Quality Monitoring Job Parameters
71
-
72
-
N/A
73
-
74
-
##### Model Quality Monitoring Job Parameters
75
-
76
-
###### Required
77
-
78
-
-`model-quality-problem-type`: The machine learning problem type of the model that the monitoring job monitors.
79
-
80
-
###### Optional
81
-
82
-
-`model-quality-inference-attribute`: The attribute of the input data that represents the ground truth label.
83
-
-`model-quality-probability-attribute`: In a classification problem, the attribute that represents the class probability.
84
-
-`model-quality-probability-threshold-attribute`: The threshold for the class probability to be evaluated as a positive result.
85
-
86
-
##### Model Bias Monitoring Job Parameters
87
-
88
-
###### Optional
89
-
90
-
-`model-bias-checkstep-analysis-config-prefix`: The S3 prefix in `model-artifacts-bucket-arn` which contains the output from the [Clarify Check Step](https://docs.aws.amazon.com/sagemaker/latest/dg/build-and-manage-steps.html#step-type-clarify-check) used for model bias.
91
-
-`model-bias-features-attribute`: The attributes of the input data that are the input features.
92
-
-`model-bias-inference-attribute`: The attribute of the input data that represents the ground truth label.
93
-
-`model-bias-probability-attribute`: In a classification problem, the attribute that represents the class probability.
94
-
-`model-bias-probability-threshold-attribute`: The threshold for the class probability to be evaluated as a positive result.
95
-
96
-
##### Model Explainability Monitoring Job Parameters
97
-
98
-
###### Optional
99
-
100
-
-`model-explainability-checkstep-analysis-config-prefix`: The S3 prefix in `model-artifacts-bucket-arn` which contains the output from the [Clarify Check Step](https://docs.aws.amazon.com/sagemaker/latest/dg/build-and-manage-steps.html#step-type-clarify-check) used for model explainability.
101
-
-`model-explainability-features-attribute`: The attributes of the input data that are the input features.
102
-
-`model-explainability-inference-attribute`: The attribute of the input data that represents the ground truth label.
103
-
-`model-explainability-probability-attribute`: In a classification problem, the attribute that represents the class probability.
50
+
#### Data Quality Monitoring Job Parameters
51
+
52
+
-`data_quality_baseline_s3_uri`: S3 URI for baseline data quality statistics
53
+
-`data_quality_output_s3_uri`: S3 URI for data quality monitoring output
54
+
-`data_quality_instance_count`: Number of ML compute instances (default: 1)
55
+
-`data_quality_instance_type`: ML compute instance type (default: "ml.m5.large")
56
+
-`data_quality_instance_volume_size_in_gb`: Size of ML storage volume in GB (default: 20)
57
+
-`data_quality_max_runtime_in_seconds`: Maximum runtime in seconds (default: 3600)
0 commit comments