Skip to content

fix: repack_model writes model data to default bucket if not write permissions #810

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

Closed
wants to merge 3 commits into from

Conversation

mvsusp
Copy link
Contributor

@mvsusp mvsusp commented May 21, 2019

Description of changes:

  • fix: repack_model writes model data to default bucket if boto session does not have write permissions to original bucket

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.

  • I have read the CONTRIBUTING doc
  • I used the commit message format described in CONTRIBUTING
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

… does not have write permissions to original bucket
@mvsusp mvsusp requested a review from ChoiByungWook May 21, 2019 16:52
try:
sagemaker_session.boto_session.resource('s3').Object(bucket, new_key).upload_file(new_model_path)
except exceptions.S3UploadFailedError:
bucket = sagemaker_session.default_bucket()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be always writing to the default bucket.

Feel free to ask for a second opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. Good point.

@jesterhazy
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jesterhazy
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@ChoiByungWook
Copy link
Contributor

#812 (comment)

@mvsusp mvsusp closed this May 31, 2019
@mvsusp mvsusp deleted the mvs-repack-from-another-account branch May 31, 2019 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants