Skip to content

change: Add support for Accept headers with multiple MIME types #80

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

Merged
merged 3 commits into from
Aug 11, 2020
Merged

change: Add support for Accept headers with multiple MIME types #80

merged 3 commits into from
Aug 11, 2020

Conversation

bveeramani
Copy link
Contributor

@bveeramani bveeramani commented Aug 5, 2020

Issue #, if available:

Description of changes:

  • Updated default_inference_handler
  • Added one test to test_default_inference_handler

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-pytorch-inference-container-pr
  • Commit ID: fc8e793
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Comment on lines +115 to +116
if content_type == content_types.CSV:
encoded_prediction = encoded_prediction.encode("utf-8")
Copy link
Contributor Author

@bveeramani bveeramani Aug 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if the encode("utf-8") call is actually necessary. If the prediction is encoded as JSON, then a string is returned. I figure that the server must automatically encode strings responses as UTF-8.

In any case, the encode("utf-8") was there before, so I've decided to keep it just to be safe.

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-pytorch-inference-toolkit-pr
  • Commit ID: fc8e793
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@bveeramani bveeramani marked this pull request as draft August 5, 2020 20:54
@bveeramani bveeramani changed the title Add support for Accept headers with multiple MIME types feature: Add support for Accept headers with multiple MIME types Aug 5, 2020
@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-pytorch-inference-container-pr
  • Commit ID: 2ebc592
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@bveeramani bveeramani marked this pull request as ready for review August 5, 2020 22:39
@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-pytorch-inference-toolkit-pr
  • Commit ID: 2ebc592
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-pytorch-inference-container-pr
  • Commit ID: 23126e0
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-pytorch-inference-toolkit-pr
  • Commit ID: 23126e0
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-pytorch-inference-toolkit-pr
  • Commit ID: 23126e0
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@bveeramani bveeramani changed the title feature: Add support for Accept headers with multiple MIME types change: Add support for Accept headers with multiple MIME types Aug 6, 2020
@bveeramani bveeramani marked this pull request as draft August 7, 2020 16:38
@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-pytorch-inference-toolkit-pr
  • Commit ID: 23126e0
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@bveeramani bveeramani marked this pull request as ready for review August 11, 2020 18:55
@bveeramani bveeramani merged commit 71d9907 into aws:master Aug 11, 2020
@bveeramani bveeramani deleted the accept-type-handling branch August 11, 2020 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants