-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add docs on TensorFlowModel class usage + requirements file for serving #393
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
Conversation
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.
just a few small suggestions - overall looks good
src/sagemaker/tensorflow/README.rst
Outdated
|
||
predictor = tf_model.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge') | ||
|
||
You can also optionally specify a pip requirements if you need to install additional packages into the deployed |
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.
s/requirements/requirements file - might also be helpful to link to something like https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format
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.
Good idea, done
src/sagemaker/tensorflow/README.rst
Outdated
predictor = tf_model.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge') | ||
|
||
You can also optionally specify a pip requirements if you need to install additional packages into the deployed | ||
runtime environment by including it in your source_dir and specifying it in the 'SAGEMAKER_REQUIREMENTS' env variable: |
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.
nit: I'd make 'SAGEMAKER_REQUIREMENTS'
monospaced
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.
Done
src/sagemaker/tensorflow/README.rst
Outdated
source_dir='my_src', # directory which contains entry_point script and requirements file | ||
name='model_name', | ||
env={'SAGEMAKER_REQUIREMENTS': 'requirements.txt'} # path relative to source_dir | ||
) |
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.
nit: I'd put the closing parenthesis on the previous line to be consistent with the other code snippet
Codecov Report
@@ Coverage Diff @@
## master #393 +/- ##
==========================================
+ Coverage 92.94% 93.11% +0.16%
==========================================
Files 51 51
Lines 3572 3572
==========================================
+ Hits 3320 3326 +6
+ Misses 252 246 -6
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #393 +/- ##
==========================================
+ Coverage 92.94% 93.11% +0.16%
==========================================
Files 51 51
Lines 3572 3572
==========================================
+ Hits 3320 3326 +6
+ Misses 252 246 -6
Continue to review full report at Codecov.
|
…ng (aws#393) * Add docs on TensorFlowModel class usage + requirements file for serving * PR updates
Issue #, if available:
Description of changes:
Add docs on TensorFlowModel usage (deploying directly from model artifacts).
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.