-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
change: add EI support for TFS framework #682
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
Please update the changelog.
Update the description in your PR conversation and also reference the PR notebook example that depends on this change.
src/sagemaker/fw_utils.py
Outdated
@@ -106,7 +106,7 @@ def _accelerator_type_valid_for_framework(framework, accelerator_type=None, opti | |||
|
|||
if framework not in VALID_EIA_FRAMEWORKS: | |||
raise ValueError('{} is not supported with Amazon Elastic Inference. Currently only ' | |||
'Python-based TensorFlow and MXNet are supported.'.format(framework)) | |||
'TensorFlow Serving, TensorFlow and MXNet are supported.'.format(framework)) |
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.
I would still keep the Python-based TensorFlow wording there.
@@ -25,7 +25,7 @@ like this: | |||
|
|||
The code block above deploys a SageMaker Endpoint with one instance of the type 'ml.c4.xlarge'. | |||
|
|||
Python-based TensorFlow serving on SageMaker has support for `Elastic Inference <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html>`_, which allows for inference acceleration to a hosted endpoint for a fraction of the cost of using a full GPU instance. In order to attach an Elastic Inference accelerator to your endpoint provide the accelerator type to ``accelerator_type`` to your ``deploy`` call. | |||
TensorFlow serving on SageMaker has support for `Elastic Inference <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html>`_, which allows for inference acceleration to a hosted endpoint for a fraction of the cost of using a full GPU instance. In order to attach an Elastic Inference accelerator to your endpoint provide the accelerator type to ``accelerator_type`` to your ``deploy`` call. |
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.
Since these documents are specific to the Python-based container, maybe we should keep the wording there?
tests/integ/test_tfs.py
Outdated
framework_version=tf_full_version, | ||
sagemaker_session=sagemaker_session, | ||
# passing an existing image for now because ei image is not in prod account yet | ||
image='562200002688.dkr.ecr.us-west-2.amazonaws.com/sagemaker-tensorflow-serving-eia:{}-cpu' |
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.
Before this PR gets merged, this will need to change.
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.
I've updated PR description with this information.
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 |
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.
coolio!
@@ -55,6 +70,16 @@ def test_predict(tfs_predictor, instance_type): # pylint: disable=W0613 | |||
assert expected_result == result | |||
|
|||
|
|||
@pytest.mark.skipif(tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS, | |||
reason='EI is not supported in region {}'.format(tests.integ.test_region())) | |||
def test_predict_with_accelerator(tfs_predictor_with_accelerator): |
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.
this should be apart of the canary.
@@ -66,6 +64,17 @@ If you already have existing model artifacts in S3, you can skip training and de | |||
|
|||
predictor = model.deploy(initial_instance_count=1, instance_type='ml.c5.xlarge') | |||
|
|||
You can also deploy the model with Amazon Elastic Inference, which allows you to attach low-cost GPU accelerators to your Amazon EC2 and SageMaker instances. |
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.
We should be consistent with where the EI code block is introduced in the documentation.
Either the current docs or this should change: https://github.com/aws/sagemaker-python-sdk/blob/aa7335c6556d122173030e5cf67b46d1b4b46b3c/src/sagemaker/tensorflow/deploying_python.rst#deploying-from-an-estimator
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 |
now that #705 has been merged, don't forget to change the PR title to include the appropriate prefix |
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.
Please update the PR title, so that it can work with the new build-system.
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 |
Issue #, if available:
Description of changes:
Update Python SDK to reflect changes in TFS container. This change should not be merged before TFS EI images get distributed.
aws/sagemaker-tensorflow-serving-container#10
aws/sagemaker-tensorflow-serving-container#12
Merge Checklist
Put an
x
in 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.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.