aws / aws/sagemaker-python-sdk
ModelTrainer API cannot configure the right Session
- 主要语言
- Python
- 星标
- 2.3k
- 派生
- 1.3k
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 35
描述
**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.
贡献指南
调研方向
从 ModelTrainer API 开始,使用 SageMaker Python SDK 2.248.0 和 Python 3.12 重现所提供的 fit(...) 示例。跟踪 SageMaker 会话的 Pydantic 验证,并确定接受哪种有效的会话输入;当 ModelTrainer.fit(...) 在没有验证错误的情况下开始训练时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- aws, python
- 领域
- api, cloud, machine-learning
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100