Skip to content

Use existing model instead of failing during Session.create_model() #306

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

Merged
merged 3 commits into from
Jul 19, 2018

Conversation

laurenyu
Copy link
Contributor

Description of changes:
Currently an exception is raised if a model already exists. This change instead logs a warning that an existing model is being used, but allows the existing model to be used in place of needing to create a new one.

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 have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (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.

@codecov-io
Copy link

Codecov Report

Merging #306 into master will decrease coverage by 0.24%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #306      +/-   ##
=========================================
- Coverage   93.05%   92.8%   -0.25%     
=========================================
  Files          50      50              
  Lines        3456    3463       +7     
=========================================
- Hits         3216    3214       -2     
- Misses        240     249       +9
Impacted Files Coverage Δ
src/sagemaker/session.py 88.47% <88.88%> (-0.06%) ⬇️
src/sagemaker/local/image.py 87.09% <0%> (-2.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 704cd31...b215f29. Read the comment docs.

PrimaryContainer=primary_container,
ExecutionRoleArn=role)
try:
self.sagemaker_client.create_model(ModelName=name,
Copy link
Contributor

Choose a reason for hiding this comment

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

Talked offline about checking whether model exist first.
Agreed to leave it this way.

@laurenyu laurenyu merged commit cb4aa9d into aws:master Jul 19, 2018
@laurenyu laurenyu deleted the ignore-existing-model branch July 19, 2018 19:09
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