aws / aws/sagemaker-python-sdk

Server Side Encryption using KMS Key failing for validate_s3_path_exists

Ouverte
#5,930 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
2.3k
Forks
1.3k
Merge moyen
1 j 22 h
PR mergées (30 j)
35

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez dans sagemaker/train/common_utils/finetune_utils.py, au niveau de _validate_s3_path_exists, puis suivez son appel depuis sagemaker.train.sft_trainer.SFTTrainer. Reproduisez le cas d’un chemin inexistant avec un bucket S3 chiffré avec SSE-KMS et vérifiez que la validation réussit et que le job SFTTrainer se poursuit sans « access denied ».

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
aws, machine-learning, python
Domaine
cloud, machine-learning
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
62/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.