-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feature: add tensorflow training 1.15.2 py37 support #1458
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
Changes from 4 commits
56635c9
ecb3e76
3f404df
e82886b
5e8f01e
80ef94b
b998482
f0e6b35
4150361
921f709
b87ffdd
475ff82
d978b78
5c8dab0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ | |
"{} framework does not support version {}. Please use one of the following: {}." | ||
) | ||
|
||
VALID_PY_VERSIONS = ["py2", "py3"] | ||
VALID_PY_VERSIONS = ["py2", "py3", "py37"] | ||
VALID_EIA_FRAMEWORKS = [ | ||
"tensorflow", | ||
"tensorflow-serving", | ||
|
@@ -71,6 +71,7 @@ | |
"pytorch-serving", | ||
] | ||
PY2_RESTRICTED_EIA_FRAMEWORKS = ["pytorch-serving"] | ||
PY37_SUPPORTED_FRAMEWORKS = ["tensorflow-scriptmode"] | ||
VALID_ACCOUNTS_BY_REGION = { | ||
"us-gov-west-1": "246785580436", | ||
"us-iso-east-1": "744548109606", | ||
|
@@ -103,7 +104,7 @@ | |
} | ||
|
||
MERGED_FRAMEWORKS_LOWEST_VERSIONS = { | ||
"tensorflow-scriptmode": {"py3": [1, 13, 1], "py2": [1, 14, 0]}, | ||
"tensorflow-scriptmode": {"py3": [1, 13, 1], "py2": [1, 14, 0], "py37": [1, 15, 2]}, | ||
"tensorflow-serving": [1, 13, 0], | ||
"tensorflow-serving-eia": [1, 14, 0], | ||
"mxnet": {"py3": [1, 4, 1], "py2": [1, 6, 0]}, | ||
|
@@ -257,6 +258,9 @@ def create_image_uri( | |
if py_version and py_version not in VALID_PY_VERSIONS: | ||
raise ValueError("invalid py_version argument: {}".format(py_version)) | ||
|
||
if py_version == "py37" and framework not in PY37_SUPPORTED_FRAMEWORKS: | ||
raise ValueError("{} does not support Python 3.7 yet.".format(framework)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe s/yet/at this time. There might some some frameworks that never receive Python 3.7 support. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
if _accelerator_type_valid_for_framework( | ||
framework=framework, | ||
py_version=py_version, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,7 +131,9 @@ def test_mnist_distributed(sagemaker_session, instance_type, tf_full_version): | |
train_instance_count=2, | ||
train_instance_type=instance_type, | ||
sagemaker_session=sagemaker_session, | ||
py_version=tests.integ.PYTHON_VERSION, | ||
py_version="py37" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about other places in this file where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was going to update them all once the container is released. But probably it's better to update them all at once. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm...maybe it would be cleaner to put this into a fixture? i.e. @pytest.fixture
def py_version():
return "py37" if tf_full_version == TensorFlow._LATEST_1X_VERSION else tests.integ.PYTHON_VERSION and then just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 Yes. This would be much better. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, I think you can leave it in the TF script mode test file, since that's the only file that uses it, and the |
||
if tf_full_version == TensorFlow._LATEST_1X_VERSION | ||
else tests.integ.PYTHON_VERSION, | ||
script_mode=True, | ||
framework_version=tf_full_version, | ||
distributions=PARAMETER_SERVER_DISTRIBUTION, | ||
|
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.
why do we need this? should we just return image not found if the given combination (Framework, Framework version, Python version) is not support?
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.
If we strip this line (L74) Python SDK will have to hit ECR service to find out if the combination exists.
If we do nothing to check for the py37 support before constructing the image uri, here will throw
KeyError
(key "py37" not found).Updating the
MERGED_FRAMEWORKS_LOWEST_VERSIONS
dict to let each entry have a "py_version" key is also doable to prevent Python SDK hit the ECR service, but I think this dict is for checking whether the image is DLC merged frameworks instead of checking Python version support.