Skip to content
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

feature: add selectable inference content for csv, json, jsonlines, and recordio-protobuf #111

Merged
merged 8 commits into from
Jun 2, 2020

Conversation

wiltonwu
Copy link
Contributor

@wiltonwu wiltonwu commented May 25, 2020

Description of changes:

  • Adds new selectable inference content feature for accept types: application/json, application/jsonlines, application/x-recordio-protobuf, and text/csv
  • This new selectable inference content is turned on via the SAGEMAKER_INFERENCE_OUTPUT enviornment variable.
    • If that env var is present, the env var will determine the content in the inference response in a string of content keys separated by commas corresponds to the allowed selectable content
    • e.g. SAGEMAKER_INFERENCE_OUTPUT='predicted_label,probabilities'

Tested with tox and integration tests.

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

Copy link
Contributor

@ericangelokim ericangelokim left a comment

Choose a reason for hiding this comment

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

It is alarming that we are now dictating what the correct values to return to customers are, for example get label for binary_log. The decisions you made make sense to me, but we might want to involve product to make sure this behavior is ok to push out.

Also, were integration tests run with the built image?

@wiltonwu
Copy link
Contributor Author

It is alarming that we are now dictating what the correct values to return to customers are, for example get label for binary_log. The decisions you made make sense to me, but we might want to involve product to make sure this behavior is ok to push out.

Okay! Let's sync up on the product point. Most of the "correct value" decisions are just an extension of the xgboost sklearn API

Also, were integration tests run with the built image?

Yep! Correct

Copy link
Contributor

@ericangelokim ericangelokim left a comment

Choose a reason for hiding this comment

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

Two small nit comments, LGTM

src/sagemaker_xgboost_container/algorithm_mode/serve.py Outdated Show resolved Hide resolved
src/sagemaker_xgboost_container/encoder.py Outdated Show resolved Hide resolved
@wiltonwu wiltonwu merged commit 483fce2 into aws:master Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants