doc: Add xgboost doc on bring your own model#1727
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
da03d7f to
d6005a8
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
@metrizable Can you please review? |
| For a sample notebook that shows to use the XGBoost built-in algorith mode to load a pre-existing XGBoost model, | ||
| see `Amazon SageMaker XGBoost Bring Your Own Model <https://github.com/awslabs/amazon-sagemaker-examples/blob/master/advanced_functionality/xgboost_bring_your_own_model/xgboost_bring_your_own_model.ipynb>`_. |
There was a problem hiding this comment.
typo with "algorithm". also, would it make more sense to put this in the "Use XGBoost as a Built-in Algorithm" section?
| For a sample notebook that shows to use the XGBoost built-in algorith mode to load a pre-existing XGBoost model, | |
| see `Amazon SageMaker XGBoost Bring Your Own Model <https://github.com/awslabs/amazon-sagemaker-examples/blob/master/advanced_functionality/xgboost_bring_your_own_model/xgboost_bring_your_own_model.ipynb>`_. | |
| For a sample notebook that shows to use the XGBoost built-in algorithm mode to load a pre-existing XGBoost model, | |
| see `Amazon SageMaker XGBoost Bring Your Own Model <https://github.com/awslabs/amazon-sagemaker-examples/blob/master/advanced_functionality/xgboost_bring_your_own_model/xgboost_bring_your_own_model.ipynb>`_. |
There was a problem hiding this comment.
Thanks for the suggestion. There will also be a section on AWS documentation, and considering your suggestion, I think it makes more sense to move this to AWS documentation since the notebook is about the built-in mode. Python SDK doc can focus on script mode.
Co-authored-by: Lauren Yu <6631887+laurenyu@users.noreply.github.com>
Co-authored-by: Lauren Yu <6631887+laurenyu@users.noreply.github.com>
Co-authored-by: Lauren Yu <6631887+laurenyu@users.noreply.github.com>
Co-authored-by: Lauren Yu <6631887+laurenyu@users.noreply.github.com>
Co-authored-by: Lauren Yu <6631887+laurenyu@users.noreply.github.com>
Co-authored-by: Lauren Yu <6631887+laurenyu@users.noreply.github.com>
Co-authored-by: Lauren Yu <6631887+laurenyu@users.noreply.github.com>
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
| ) | ||
|
|
||
| # If payload is a string in LIBSVM format, we need to change serializer. | ||
| predictor.serializer = str |
There was a problem hiding this comment.
what is str supposed to be here?
There was a problem hiding this comment.
We've been using serializer = str in our XGBoost notebook examples because the most natural format for XGBoost is libsvm and there is no default libsvm serializer. My understanding is predictor expects a byte sequence like a numpy array by default, so I've been using serializer = str when I have a payload in libsvm string format. Is there a better way (other than writing a custom serializer)?
There was a problem hiding this comment.
ah, gotcha. no, the only other way would be to write a custom serializer.
There was a problem hiding this comment.
The predictor is an XGBoost model - couldn't we override the default serializer to str for it?
There was a problem hiding this comment.
Yes, we could override it here: https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/xgboost/model.py#L45. But I guess the question is if it's going to break any customers who were assuming a different default.
There was a problem hiding this comment.
if it makes sense to change it, you can make another PR against the "zwei" branch - that's where our v2 work is happening right now
There was a problem hiding this comment.
Cool, thanks for the pointer! And also for reminding me that our team needs to revisit the xgboost and sklearn estimator before v2 for issues like this.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Description of changes:
This CR adds a section on how to deploy an inference server with an XGBoost model that was trained outside SageMaker.
Merge Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
unique_name_from_baseto create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.