feature: `ProcessingS3Output`'s `s3_uri` to be an optional field (5559) by aviruthen · Pull Request #5715 · aws/sagemaker-python-sdk
Description
The issue requests that ProcessingS3Output's s3_uri field be optional (defaulting to None) in V3, matching V2's ProcessingOutput.destination behavior where None delegates S3 path generation to SageMaker. Two changes are needed: (1) In the auto-generated shapes file, change ProcessingS3Output.s3_uri from a required str field to Optional[str] = None. (2) In processing.py, update _normalize_outputs() to handle the case where output.s3_output.s3_uri is None by auto-generating an S3 URI (the existing non-S3 scheme branch already does this), and update _processing_output_to_request_dict() to omit S3Uri from the request dict when it's None (letting SageMaker service generate the path). The _normalize_outputs method currently does urlparse(output.s3_output.s3_uri) which would crash on None, and also checks output.s3_output existence but not s3_uri being None.
Related Issue
Related issue: 5559
Changes Made
sagemaker-core/src/sagemaker/core/processing.pysagemaker-core/tests/unit/test_processing.py
AI-Generated PR
This PR was automatically generated by the PySDK Issue Agent.
- Confidence score: 85%
- Classification: type: feature request
- SDK version target: V3
Merge Checklist
- Changes are backward compatible
- Commit message follows
prefix: descriptionformat - Unit tests added/updated
- Integration tests added (if applicable)
- Documentation updated (if applicable)