aws / aws/sagemaker-python-sdk

Server Side Encryption using KMS Key failing for validate_s3_path_exists

Abierto
#5,930 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
2.3k
Forks
1.3k
Merge medio
1 d 22 h
PR fusionados (30 d)
35

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza en sagemaker/train/common_utils/finetune_utils.py, en _validate_s3_path_exists, y luego sigue su llamada desde sagemaker.train.sft_trainer.SFTTrainer. Reproduce el caso de una ruta inexistente con un bucket de S3 cifrado con SSE-KMS y verifica que la validación se realice correctamente y que el trabajo de SFTTrainer continúe sin „access denied“.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
aws, machine-learning, python
Área
cloud, machine-learning
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
62/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.