aws / aws/sagemaker-python-sdk
ModelTrainer API cannot configure the right Session
- Vorherrschende Sprache
- Python
- Sterne
- 2.3k
- Forks
- 1.3k
- Ø Merge
- 1 T. 22 Std.
- Gemergte PRs (30 T.)
- 35
Beschreibung
**Describe the bug**
I'm trying to train a model using the `sagemaker.modules.train.ModelTrainer` API. However, it keeps trying to validate the SageMaker session using Pydantic, only never to accept any possible input. It spits out the Validation Error you see in the screenshot attached below.
**To reproduce**
1. Write a ModelTrainer compatible script
2. Write the following code:
```python
model_trainer = ModelTrainer(
training_image=image_uri, compute=compute, source_code=source_code,
hyperparameters=hyperparameters, environment=env,
base_job_name=job_prefix,
stopping_condition=StoppingCondition(max_runtime_in_seconds=90000),
checkpoint_config=CheckpointConfig(s3_uri=f"{checkpoint_s3_path}/{job_prefix}"),
)
model_trainer.fit(...)
```
**Expected behavior**
Training to start
**Screenshots or logs**
**System information**
A description of your system. Please provide:
- **SageMaker Python SDK version**: 2.248.0
- **Framework name (eg. PyTorch) or algorithm (eg. KMeans)**: N/A
- **Framework version**: N/A
- **Python version**: 3.12
- **CPU or GPU**: GPU
- **Custom Docker image (Y/N)**: N
**Additional context**
Tried to downgrade to other SageMaker SDK versions, but couldn't get to a working one.
Beitragsleitfaden
Rechercherichtung
Beginne mit der ModelTrainer API und reproduziere das bereitgestellte fit(...) Beispiel mit SageMaker Python SDK 2.248.0 und Python 3.12. Verfolge die Pydantic-Validierung der SageMaker-Session und ermittle, welche gültige Session-Eingabe akzeptiert wird; als erledigt gilt die Aufgabe, wenn ModelTrainer.fit(...) ohne Validierungsfehler mit dem Training beginnt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, python
- Bereich
- api, cloud, machine-learning
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100