-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: Fix Tensorflow default model_dir generation when output_path is pipeline variable #3146
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 |
Codecov Report
@@ Coverage Diff @@
## master #3146 +/- ##
=======================================
Coverage 89.62% 89.62%
=======================================
Files 200 200
Lines 17387 17391 +4
=======================================
+ Hits 15583 15587 +4
Misses 1804 1804
Continue to review full report at Codecov.
|
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 |
…pipeline variable
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 |
@@ -378,6 +379,9 @@ def _default_s3_path(self, directory, mpi=False): | |||
if mpi: | |||
return "/opt/ml/model" | |||
if self._current_job_name: | |||
if is_pipeline_variable(self.output_path): | |||
output_path = "s3://{}".format(self.sagemaker_session.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.
what happens here if customer is using custom S3 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.
Thanks for reviewing!
This update is within the _default_s3_path
which means it's generating a default path for the model_dir
output if user does not specify it. Thus I think that's fine.
If users hope to use custom s3 bucket they should explicitly assign a s3 path to model_dir
field of TensorFlow
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 |
…pipeline variable (aws#3146)
Issue #, if available: #3142
Description of changes:
Fix Tensorflow default
model_dir
generation whenoutput_path
is pipeline variable. Originally, ifmodel_dir
is None,output_path
would be used to generate a defaultmodel_dir
. However, this won't work ifoutput_path
is a PipelineVariable. This PR updates to use the default bucket to replaceoutput_path
in this case.Testing done: unit tests and integ tests
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.