aws / aws/sagemaker-python-sdk
Server Side Encryption using KMS Key failing for validate_s3_path_exists
- 主要言語
- Python
- スター
- 2.3k
- フォーク
- 1.3k
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 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 バケットを使って、パスが存在しないケースを再現し、検証が成功して SFTTrainer ジョブが access denied なしで進行することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, machine-learning, python
- 領域
- cloud, machine-learning
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 62/100