aws / aws/sagemaker-python-sdk

sagemaker.model_monitor.Constraints.set_monitoring() method only allows disabling monitoring for string data

Đang mở
#2,745 0 bình luận 0 reaction 1 người được giao Được @nargokul nhận Xem trên GitHub
component: model monitor type: bug
Ngôn ngữ chính
Python
Star
2.3k
Fork
1.3k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
35

Mô tả

**Describe the bug**
I want to override the constraint enforcement for a binary variable. However, the `set_monitoring` method of the sagemaker.model_monitor.Constraints object only allows that to happen for string-type variables with a `string_constraints` section. In addition, the method puts the override inside the `string_constraints` section, contrary to what the official documentation says it should do.

**To reproduce**
- Create a baseline for binary data called `Churn`
- Get the constraints object: `suggested_constraints = baseline_job.suggested_constraints()`
- Set the desired property: `suggested_constraints.set_monitoring(False, feature_name="Churn")`
- Observe the error about the lack of a `string_constraints` section.

**Expected behavior**
The Churn variable's constraints gets a `monitoring_config_overrides` section that includes the value pair `"evaluate_constraints": "Disabled"`.

**Screenshots or logs**
If applicable, add screenshots or logs to help explain your problem.

**System information**
A description of your system. Please provide:
- **SageMaker Python SDK version**: 1.18.51
- **Framework name (eg. PyTorch) or algorithm (eg. KMeans)**:
- **Framework version**: 3.7
- **Python version**: 3.7
- **CPU or GPU**: CPU
- **Custom Docker image (Y/N)**: N

**Additional context**
Add any other context about the problem here.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.