Skip to content

Add warning if framework_version is not set #431

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 4 commits into from
Oct 15, 2018

Conversation

laurenyu
Copy link
Contributor

Description of changes:
In the near future, we will make framework_version a required argument for all framework estimators. This change adds a warning if framework_version is not currently set.

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-io commented Oct 15, 2018

Codecov Report

Merging #431 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #431      +/-   ##
==========================================
+ Coverage   93.71%   93.75%   +0.03%     
==========================================
  Files          55       55              
  Lines        4012     4032      +20     
==========================================
+ Hits         3760     3780      +20     
  Misses        252      252
Impacted Files Coverage Δ
src/sagemaker/fw_utils.py 100% <100%> (ø) ⬆️
src/sagemaker/mxnet/estimator.py 100% <100%> (ø) ⬆️
src/sagemaker/tensorflow/estimator.py 93.52% <100%> (+0.09%) ⬆️
src/sagemaker/chainer/estimator.py 100% <100%> (ø) ⬆️
src/sagemaker/pytorch/estimator.py 100% <100%> (ø) ⬆️

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 385d40a...1326126. Read the comment docs.

nadiaya
nadiaya previously approved these changes Oct 15, 2018
UploadedCode = namedtuple('UserCode', ['s3_prefix', 'script_name'])
"""sagemaker.fw_utils.UserCode: An object containing the S3 prefix and script name.

This is for the source code used for the entry point with an ``Estimator``. It can be
instantiated with positional or keyword arguments.
"""

EMPTY_FRAMEWORK_VERSION_WARNING = 'In an upcoming version of the SageMaker Python SDK, ' \
'framework_version will be required to create an estimator. ' \
'Please add framework_version={} to your constructor to avoid ' \
Copy link
Contributor

Choose a reason for hiding this comment

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

to the constructor instead of to your constructor?

Doesn't really matter though.

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 think "your" makes it more clear we're referring to the user's code

CHANGELOG.rst Outdated
@@ -9,6 +9,7 @@ CHANGELOG
* feature: Add timestamp to secondary status in training job output
* bug-fix: Local Mode: Set correct default values for additional_volumes and additional_env_vars
* enhancement: Local Mode: support nvidia-docker2 natively
* Frameworks: add warning for upcoming breaking change that makes framework_version required
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: Frameworks ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@laurenyu laurenyu merged commit a75a7b5 into aws:master Oct 15, 2018
@laurenyu laurenyu deleted the add-framework-version-warning branch October 15, 2018 23:39
pdasamzn pushed a commit to pdasamzn/sagemaker-python-sdk that referenced this pull request Nov 1, 2018
In the future, a breaking change will be released that causes
framework_version to be required when creating a
Framework estimator. This change adds a warning when
an estimator is created without framework_version defined.
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