aws / aws/sagemaker-python-sdk

Cannot use spark_event_logs_s3_uri in PySparkProcessor job

Đang mở Phù hợp với người mới
#6,253 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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ả

**PySDK Version**
- [ ] PySDK V2 (2.x)
- [x] PySDK V3 (3.x)

**Describe the bug**

Similar to #6252 - PySparkProcessor `run` no longer handles `spark_event_logs_s3_uri` due to changes in the `ProcessingOutput` interface - e.g. regression introduced in 3203e49

**To reproduce**

Provide any (valid) S3 URI for the spark log location.

**Expected behavior**

Successfully starts the job.

**Screenshots or logs**

```
ValidationError: 4 validation errors for ProcessingOutput
output_name
Field required [type=missing, input_value={'source': '/opt/ml/proce...oad_mode': 'Continuous'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.13/v/missing
source
Extra inputs are not permitted [type=extra_forbidden, input_value='/opt/ml/processing/spark-events/', input_type=str]
For further information visit https://errors.pydantic.dev/2.13/v/extra_forbidden
destination
Extra inputs are not permitted [type=extra_forbidden, input_value='s3://...', input_type=str]
For further information visit https://errors.pydantic.dev/2.13/v/extra_forbidden
s3_upload_mode
Extra inputs are not permitted [type=extra_forbidden, input_value='Continuous', input_type=str]
For further information visit https://errors.pydantic.dev/2.13/v/extra_forbidden
```

The cause of the error is [here](https://github.com/aws/sagemaker-python-sdk/blob/8e7485a1ed25eb17c70f2323ab6ed6c9695d7024/sagemaker-core/src/sagemaker/core/spark/processing.py#L293-L297):

```py
output = ProcessingOutput(
source=_SparkProcessorBase._spark_event_log_default_local_path,
destination=spark_event_logs_s3_uri,
s3_upload_mode="Continuous",
)
```

**System information**

- AWS SageMaker Studio 4.4.3
- sagemaker-core: 2.20
- Python 3.12.14
- uname: Linux default 6.12.103-127.188.amzn2023.x86_64 SMP PREEMPT_DYNAMIC Tue Aug 25 15:42:53 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux

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

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

Hướng nghiên cứu

Bắt đầu trong sagemaker-core/src/sagemaker/core/spark/processing.py, tại phần xây dựng ProcessingOutput cho nhật ký sự kiện của PySparkProcessor. Tái hiện lỗi với một spark_event_logs_s3_uri hợp lệ và kiểm tra interface ProcessingOutput hiện tại. Hoàn tất khi job PySparkProcessor khởi động thành công với nhật ký sự kiện Spark được cấu hình.

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

Đánh giá

Công nghệ
python, spark
Lĩnh vực
data-engineering, machine-learning
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
78/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.