aws / aws/sagemaker-python-sdk
Cannot upload local file for submit_py_files in V3
- 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**
The PySparkProcessor `run` no longer accepts local files due to the change to `ProcessingInput` interface - e.g. regression introduced in 3203e49
**To reproduce**
Insert a local file path into the list passed as `submit_py_files` in `sagemaker.core.spark.processing.PySparkProcessor.run()`.
(Let me know if you need a more concrete example).
**Expected behavior**
Successfully starts the job.
**Screenshots or logs**
PyDantic reports the following errors:
```
ValidationError: 2 validation errors for ProcessingInput
source
Extra inputs are not permitted [type=extra_forbidden, input_value='s3://sagemaker-.../input/py-files', 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='/opt/ml/processing/input/py-files', 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#L508-L512):
```py
input_channel = ProcessingInput(
source=input_channel_s3_uri,
destination=f"{self._conf_container_base_path}{input_channel_name}",
input_name=input_channel_name,
)
```
**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
**Additional context**
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu trong sagemaker/core/spark/processing.py, tại mã của PySparkProcessor.run() khoảng các dòng 508-512, và theo dõi cách một đường dẫn cục bộ trong submit_py_files được chuyển đổi thành ProcessingInput. Hoàn thành khi một đường dẫn tệp cục bộ được chấp nhận và job xử lý khởi chạy thành công mà không có các lỗi xác thực Pydantic đã được báo cáo.
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, spark
- Lĩnh vực
- backend-api-design, 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
- 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