-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sagemaker): support batch-transform #6055
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #6055 +/- ##
==========================================
- Coverage 76.93% 76.85% -0.09%
==========================================
Files 145 145
Lines 13889 13916 +27
==========================================
+ Hits 10686 10695 +9
- Misses 3203 3221 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can u add tests with docker?
Added - a7faa6f |
Goals
PR in continuation to #6046.
Sagemaker still calls the
POST /invocations
route during batch-transform but with different content-type & body. To enable bothapplication/json
(for inference) andtext/csv
(for batch-transform, I removed the pydantic model from the path signature, rather use fastapi'sRequest
class and evaluate the body according to the content-type.For batch-transform,
text/csv
orapplication/csv
content type.input_model
(user-defined model in the Executor route).Gotchas
Sagemaker doesn't support CSV with headers. We follow the same restriction.
Rows in the input csv should have all fields defined in the input type (including optional fields like
id
)Following inputs are valid
Following CSV is invalid.
End-to-end tests
I've manually tested the Executor after pushing a model to S3, the Executor image to ECR & running batch-transform jobs for both
SingleLine
andMultiLine
records.