-
Notifications
You must be signed in to change notification settings - Fork 1.2k
documentation: Add Remote Function updates #3805
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
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 |
Codecov Report
@@ Coverage Diff @@
## master #3805 +/- ##
==========================================
- Coverage 89.87% 89.13% -0.75%
==========================================
Files 1056 246 -810
Lines 100912 24973 -75939
==========================================
- Hits 90693 22259 -68434
+ Misses 10219 2714 -7505
... and 1300 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
doc/overview.rst
Outdated
Tags: | ||
- {'Key': 'yourTagKey', 'Value': 'yourTagValue'} |
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.
should this tags key and value be in a similar format as line 2021 to keep the consistency?
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.
agree, done
doc/overview.rst
Outdated
- 'command_1' | ||
- 'command_2' | ||
PreExecutionScript: 'path/to/script.sh' | ||
RoleArn: 'arn:aws:iam::366666666666:role/MyRole' |
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 for the sake of consistency, can we change account Id here to 555555555555
as line 2020, same with imageUri field
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.
doc/overview.rst
Outdated
'context': {...}} | ||
'context': {...}}cd |
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.
is this change on purpose? what does cd do here?
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 catch.
"""Function that starts a new SageMaker job synchronously with overridden runtime settings. | ||
"""Decorator for running the annotated function as a SageMaker training job. | ||
|
||
This decorator wraps the annotated code and runs it is a new SageMaker job synchronously |
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: runs it is a
--> runs it as a
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.
fixed.
instance_count (int): The number of instance to use. Defaults to 1. | ||
|
||
instance_type (str): The Amazon Elastic Compute Cloud (EC2) instance type to use to run | ||
the SageMaker job. Valid values include ml.c4.xlarge. If not provided, ValueError is |
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.
Valid values include ml.c4.xlarge.
It can be anything right?
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.
changed the statement to "e.g. ml..."
max_retry_attempts (int): The max number of times the job is retried after an on | ||
```InternalServerFailure``` Error. Defaults to 1. |
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.
after an on
?
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.
fixed.
|
||
max_runtime_in_seconds (int): The upper limit in seconds to be used for training. After | ||
this specified amount of time, SageMaker terminates the job regardless of its current | ||
status. The max_run_duration time defaults to 1 day or (86400 seconds). |
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.
Should this be The max_runtime_in_seconds time defaults to 1 day or (86400 seconds).
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.
fixed
s3_root_uri (str): The root S3 folder to which where the code archives and data are | ||
uploaded to. Defaults to ``s3://<sagemaker-default-bucket>``. |
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.
to which where
--> to which
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.
fixed
timeout (int): Timeout in seconds to wait for until the job is to completed before it is | ||
stopped. Defaults to ``None``. |
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.
job is to completed
sounds grammatically incorrect
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.
corrected.
enable_network_isolation (bool): A flag that specifies whether container will run in | ||
network isolation mode. Defaults to ``False``. Network isolation mode restricts the | ||
container access to outside networks (such as the Internet). The container does not | ||
make any inbound or outbound network calls. Also known as Internet-free mode. | ||
""" | ||
|
||
def _remote(func): |
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.
all the comments as previous def remote
function might apply here, please verify
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.
+1. Done.
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 |
in the system path. | ||
|
||
* The parameter dependencies is set to auto_capture. SageMaker will automatically | ||
generate a env_snapshot.yml corresponding to the current active conda environment’s |
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.
generate (an) env_snapshot.yml (file)
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.
fixed
doc/overview.rst
Outdated
Run Machine Learning code on SageMaker using remote function | ||
************************************************************ | ||
|
||
You can seamlessly integrate your local machine language (ML) code to run in a Amazon SageMaker Training job by wrapping |
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.
->remove "seamlessly"
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
Amazon Elastic Container Registry (ECR). Defaults to the following based on where the SDK | ||
is running: | ||
|
||
* For SageMaker Studio notebook cases, the image used as the kernel image for the |
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.
For SageMaker Studio notebook (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.
fixed to align with next comment.
|
||
* For SageMaker Studio notebook cases, the image used as the kernel image for the | ||
notebook is used. | ||
* For other cases, it is resolved to base python image with the same python version |
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.
For other (users),...
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.
fixed.
local directories. Set to ``True`` if the remote function code imports local modules and | ||
methods that are not available via PyPI or conda. Default value is ``False``. | ||
|
||
instance_count (int): The number of instance to use. Defaults to 1. |
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.
instance(s)
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.
fixed.
warm pools. The use of warmpools reduces the latency time spent to provision new | ||
resources. The default value for ``keep_alive_period_in_seconds`` is 0. | ||
NOTE: Additional charges associated with warm pools may apply. Using this parameter will | ||
also activate a new persistent cache feature, which will further reduce job start up |
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.
Persistent Cache (capitalized, according to Tritin)
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.
fixed.
|
||
Returns: | ||
The Python object returned by the function | ||
The Python object returned by the remote function execution. |
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.
remove (execution)
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.
fixed
"""Wait for the underlying sagemaker job to complete. | ||
"""Wait for the underlying SageMaker job to complete. | ||
|
||
This method waits for the SageMaker job created as a result of the remote function execution |
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.
execution -> run
Args: | ||
timeout (int): Timeout in seconds to wait until the job is completed. ``None`` by | ||
default. | ||
timeout (int): Timeout in seconds to wait for until the job is completed before it is |
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.
remove (for)-> Timeout in seconds to wait until the job is completed...
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.
fixed
manages interactions with Amazon SageMaker APIs and any other | ||
AWS services needed. | ||
job_name_prefix (str): A prefix used to identify the SageMaker jobs associated with remote | ||
function execution. |
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.
execution -> run
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.
fixed.
AWS services needed. | ||
job_name_prefix (str): A prefix used to identify the SageMaker jobs associated with remote | ||
function execution. | ||
sagemaker_session (sagemaker.session.Session): A session object which manages interactions |
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.
A session object (that) manages
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.
updated.
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 |
c385f93
to
9990b3b
Compare
* Add remote function related classes and method specifications * Update Configuration File specification to include remote function function as supported SageMaker capability.
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 |
Issue #, if available:
Description of changes:
Testing done:
tox -e twine,sphinx
pass locally.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.General
Tests
unique_name_from_base
to 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.