aws / aws/sagemaker-python-sdk

Server Side Encryption using KMS Key failing for validate_s3_path_exists

Đang mở
#5,930 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
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ả

**PySDK Version**
- [ ] PySDK V2 (2.x)
- [x] PySDK V3 (3.x)

**Describe the bug**
While running `sagemaker.train.sft_trainer.SFTTrainer`, internally, the function `sagemaker.train.common_utils.finetune_utils._validate_s3_path_exists` is called but if the s3 bucket referred has SSE (Server Side Encryption) enabled and the path doesn't exist, `s3.put_object` fails.

**To reproduce**
* Add SSE using kms key to your target s3 bucket for SFT job
* For any dataset, try running SFTTrainer job, it fails saying access denied.

**Expected behavior**
Since kms_key_id is an accepted parameter in SFTTrainer, `_validate_s3_path_exists` should succeed and proceed to launch the job. Note that after the actual training is done, the subsequent `put_object` for model files does not fail.

**System information**
A description of your system. Please provide:
- **SageMaker Python SDK version**: 3.12.0
- **Python version**: 3.12
- **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

Hướng nghiên cứu

Bắt đầu tại sagemaker/train/common_utils/finetune_utils.py ở _validate_s3_path_exists, sau đó lần theo lệnh gọi hàm này từ sagemaker.train.sft_trainer.SFTTrainer. Tái hiện trường hợp đường dẫn không tồn tại với một bucket S3 được mã hóa bằng SSE-KMS và xác minh rằng quá trình xác thực thành công và job SFTTrainer tiếp tục mà không gặp „access denied“.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, machine-learning, python
Lĩnh vực
cloud, machine-learning
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
62/100

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.