aws / aws/sagemaker-python-sdk

ModelTrainer API cannot configure the right Session

Đang mở
#5,237 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
component: training type: bug
Ngôn ngữ chính
Python
Star
2.3k
Fork
1.3k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
35

Mô tả

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

Image

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với API ModelTrainer và tái hiện ví dụ fit(...) được cung cấp bằng SageMaker Python SDK 2.248.0 và Python 3.12. Theo dõi quá trình xác thực Pydantic của phiên SageMaker và xác định đầu vào phiên hợp lệ nào được chấp nhận; được xem là hoàn tất khi ModelTrainer.fit(...) bắt đầu quá trình huấn luyện mà không có lỗi xác thực.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, python
Lĩnh vực
api, cloud, machine-learning
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.