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
Copy file name to clipboardExpand all lines: modules/sagemaker/sagemaker-model-monitoring/README.md
+192-2Lines changed: 192 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,14 +13,50 @@ Available monitoring types:
13
13
* Model Bias
14
14
* Model Explainability
15
15
16
+
### Baseline Generation
17
+
18
+
The module includes an optional automated baseline generation feature that creates baseline statistics and constraints for your monitoring jobs. When you provide training data, the module will:
19
+
20
+
1. Deploy a Step Functions state machine that orchestrates baseline generation
21
+
2. Run SageMaker Processing jobs to analyze your training data
22
+
3. Generate baseline statistics and constraints files
23
+
4. Store the baseline artifacts in your specified S3 location
24
+
5. Schedule automatic baseline regeneration (default: daily at 2 AM UTC)
25
+
26
+
The baseline generation uses a Lambda function deployed as a Docker container image to handle the SageMaker SDK dependencies efficiently.
27
+
16
28
Note that updating parameters will require replacing resources. Deployments may be delayed until any
17
29
running monitoring jobs complete (and the resources can be destroyed).
18
30
19
31
### Architecture
20
32
21
33

22
34
23
-
## Inputs/Outputs
35
+
1.**SageMaker Endpoint** - The deployed model endpoint being monitored
36
+
-**WARNING**: Data capture must be enabled for monitoring to function
-**SageMaker Monitoring Jobs**: Compare captured data against baselines
54
+
- Supports data quality, model quality, model bias, and model explainability monitoring
55
+
56
+
5.**Monitoring Outputs** - Results and alerts
57
+
-**Violations Report**: Detailed violations file emitted to S3
58
+
-**CloudWatch Metrics**: Some monitoring types emit metrics (e.g., data quality drift)
59
+
-**CloudWatch Alarms**: Can be configured based on emitted metrics for automated alerting
24
60
25
61
### Input Parameters
26
62
@@ -45,6 +81,19 @@ One or more of:
45
81
-`sagemaker_project_name`: SageMaker project name
46
82
-`tags`: Dictionary of tags to apply to resources
47
83
84
+
#### Baseline Generation Parameters (Optional)
85
+
86
+
These parameters control the automated baseline generation feature:
87
+
88
+
-`baseline_training_data_s3_uri`: S3 URI for the training data used to generate baselines (e.g., `s3://bucket/path/to/training-data.csv`)
89
+
-`baseline_output_data_s3_uri`: S3 URI where baseline statistics and constraints will be stored (e.g., `s3://bucket/path/to/baseline-output/`)
90
+
-`baseline_instance_count`: Number of ML compute instances for baseline generation (default: 1)
91
+
-`baseline_instance_type`: ML compute instance type for baseline generation (default: "ml.m5.xlarge")
92
+
-`baseline_volume_size_gb`: Size of ML storage volume in GB for baseline generation (default: 20)
93
+
-`baseline_max_runtime_seconds`: Maximum runtime in seconds for baseline generation jobs (default: 3600)
94
+
95
+
**Note**: If `baseline_training_data_s3_uri` and `baseline_output_data_s3_uri` are provided, the module will automatically create a Step Functions state machine to generate and update baselines for all enabled monitoring types.
The baseline generation Step Functions state machine accepts events with the following structure. You can manually trigger the state machine with these event payloads:
0 commit comments