aws / aws/sagemaker-python-sdk

Server Side Encryption using KMS Key failing for validate_s3_path_exists

未关闭
#5,930 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
2.3k
派生
1.3k
平均合并
1 天 22 小时
30 天内合并 PR
35

描述

**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.

贡献指南

打开贡献指南

调研方向

从 sagemaker/train/common_utils/finetune_utils.py 中的 _validate_s3_path_exists 开始,然后追踪其从 sagemaker.train.sft_trainer.SFTTrainer 发起的调用。使用经过 SSE-KMS 加密的 S3 bucket 重现路径缺失的情况,并验证校验成功且 SFTTrainer 作业在没有出现 „access denied“ 的情况下继续执行。

由索引模型根据 Issue 内容生成。

评估

技术栈
aws, machine-learning, python
领域
cloud, machine-learning
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
62/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。