get_base_python_image_uri() returns URIs for unsupported Python versions
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 74/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- aws, python
- Ambito
- cloud, machine-learning
Direzione di ricerca
Cerca get_base_python_image_uri() nel codice di SageMaker Python SDK V3 e leggi la docstring, che indica che i valori supportati sono 310 e 38. Controlla i test vicini per vedere come vengono gestite le versioni di Python e gli URI delle immagini. Il lavoro è completato quando le versioni non supportate, come 311, vengono rifiutate chiaramente, mentre 310 e 38 continuano a produrre gli URI previsti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 2.3k
- Fork
- 1.3k
- Merge medio
- 1g 23h
- PR unite (30g)
- 81
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws/sagemaker-python-sdk
-
[Bug] ModelTrainer with no input channels emits InputDataConfig: [], which CreatePipeline rejects (min=1) — v2 omitted the keyForse già presa @sagemaker-bot l’ha presa 30 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws/sagemaker-python-sdk#6156 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
sagemaker-train should depend on mlflow-skinny, following sagemaker-mlflow 0.5.0Forse già presa @mohamedzeidan2021 l’ha presa 31 giorni fa. Aperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
aws/sagemaker-python-sdk#6152 ·
I maintainer di solito rispondono entro 1 giorno
-
`ModelTrainer` bug with method to load hyperparameters from file for Amazon Nova RecipeForse già presa @sagemaker-bot l’ha presa 30 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
aws/sagemaker-python-sdk#5770 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
aws/sagemaker-python-sdk#5588 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
aws/sagemaker-python-sdk#6542 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di aws/sagemaker-python-sdk
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
aws-samples/sample-per-model-bedrock#639 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
awslabs/visual-asset-management-system#937 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
project-codeflare/codeflare-sdk#1195 ·
I maintainer di solito rispondono entro 1 giorno
-
Bump numpy dependencyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
pandas-dev/pandas-stubs#2051 ·
I maintainer di solito rispondono entro 1 giorno