get_base_python_image_uri() returns URIs for unsupported Python versions
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 74/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- aws, python
- Área
- cloud, machine-learning
Línea de trabajo
Busca get_base_python_image_uri() en el código de SageMaker Python SDK V3 y lee su docstring, que indica que los valores admitidos son 310 y 38. Revisa las pruebas cercanas para ver cómo se gestionan las versiones de Python y los URI de imagen. La tarea estará terminada cuando las versiones no admitidas, como 311, se rechacen claramente, mientras que 310 y 38 sigan produciendo los URI esperados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
PySDK Version
- PySDK V2 (2.x)
- PySDK V3 (3.x)
Describe the bug
The get_base_python_image_uri() function returns image URIs for Python versions that don't have corresponding base images in ECR. When these URIs are used in SageMaker jobs, they fail with image not found errors.
To reproduce
from sagemaker.core.image_uris import get_base_python_image_uri
# Request Python 3.11 base image - THIS FAILS
uri_311 = get_base_python_image_uri(region="us-east-1", py_version="311")
print(f"Python 3.11 URI: {uri_311}")
# Attempt to use this URI in a SageMaker job will fail
# Request Python 3.10 base image - THIS WORKS
uri_310 = get_base_python_image_uri(region="us-east-1", py_version="310")
print(f"Python 3.10 URI: {uri_310}")
# Works fine with SageMaker jobs
Only Python 3.8 and 3.10 have corresponding base images in ECR. Attempting to use Python 3.11, 3.13, or any other unsupported version results in a failure when the SageMaker job tries to pull the image.
Expected behavior
The function should either:
- Only accept Python versions for which base images actually exist in ECR (currently 3.8 and 3.10)
- Raise a clear
ValueErrorlisting the supported Python versions - Update the docstring to document which Python versions are supported
Screenshots or logs
Error occurs only when using unsupported Python versions (e.g., 3.11):
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the CreateTrainingJob operation: Cannot find the requested image: 012345678901.dkr.ecr.us-west-2.amazonaws.com/sagemaker-base-python-311:1.0 with tag: 1.0 and digest: null. Please check if your ECR image exists and role arn:aws:iam::123456789012:role/SM-Training-ABCDEFGHIJ has proper pull permissions for SageMaker: ecr:BatchCheckLayerAvailability, ecr:BatchGetImage, ecr:GetDownloadUrlForLayer
The issue is that the base image sagemaker-base-python-311 does not exist in ECR. Using Python 3.10 works without this error.
System information
- SageMaker Python SDK version: 3.x
- Framework name: N/A (base Python image issue)
- Framework version: N/A
- Python version: 3.11, 3.13 (attempted), 3.10 working
- CPU or GPU: N/A
- Custom Docker image: N/A
Additional context
The function's docstring states "Can be 310 or 38", but the function accepts any string value for py_version without validation. This creates a discrepancy between documented and actual supported versions, and affects automated image discovery.
- Lenguaje dominante
- Python
- Estrellas
- 2.3k
- Forks
- 1.3k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 81
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws/sagemaker-python-sdk
-
[Bug] ModelTrainer with no input channels emits InputDataConfig: [], which CreatePipeline rejects (min=1) — v2 omitted the keyPosiblemente ocupada @sagemaker-bot la tomó hace 29 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aws/sagemaker-python-sdk#6156 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
sagemaker-train should depend on mlflow-skinny, following sagemaker-mlflow 0.5.0Posiblemente ocupada @mohamedzeidan2021 la tomó hace 30 días. Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
aws/sagemaker-python-sdk#6152 ·
Los mantenedores suelen responder en 1 día
-
`ModelTrainer` bug with method to load hyperparameters from file for Amazon Nova RecipePosiblemente ocupada @sagemaker-bot la tomó hace 29 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aws/sagemaker-python-sdk#5770 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
aws/sagemaker-python-sdk#5588 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
aws/sagemaker-python-sdk#6542 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de aws/sagemaker-python-sdk
Issues similares
-
app: scripts status: backlog type: documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
netbox-community/netbox-scripts#68 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
marin-community/marin#10765 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
flathub/com.unity.UnityHub#230 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Claiming namespace `lang2hong`Abiertonamespace operations
Dificultad 1/5 Menos de una hora Aptitud para principiantes 63/100
EclipseFdn/open-vsx.org#14910 ·
Los mantenedores suelen responder en 1 día