-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feature: Add support for PyTorch 1.2.0 #1091
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 all commits
e216bd7
43e7c80
efaccc2
e094ed4
52a3de2
5f0ed7a
3fc299e
1236c6b
7cde798
74d66c5
22d5dd1
1768d7c
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 |
---|---|---|
|
@@ -222,7 +222,7 @@ PyTorch SageMaker Estimators | |
|
||
With PyTorch SageMaker Estimators, you can train and host PyTorch models on Amazon SageMaker. | ||
|
||
Supported versions of PyTorch: ``0.4.0``, ``1.0.0``, ``1.1.0``. | ||
Supported versions of PyTorch: ``0.4.0``, ``1.0.0``, ``1.1.0``, ``1.2.0``. | ||
|
||
We recommend that you use the latest supported version, because that's where we focus most of our development efforts. | ||
|
||
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. also, the table at the bottom of this README should be updated (feel free to do in a separate PR) |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,8 @@ | |
"tensorflow-serving-eia": "tensorflow-inference-eia", | ||
"mxnet": "mxnet-training", | ||
"mxnet-serving": "mxnet-inference", | ||
"pytorch": "pytorch-training", | ||
"pytorch-serving": "pytorch-inference", | ||
"mxnet-serving-eia": "mxnet-inference-eia", | ||
} | ||
|
||
|
@@ -76,6 +78,8 @@ | |
"tensorflow-serving-eia": [1, 14, 0], | ||
"mxnet": [1, 4, 1], | ||
"mxnet-serving": [1, 4, 1], | ||
"pytorch": [1, 2, 0], | ||
"pytorch-serving": [1, 2, 0], | ||
"mxnet-serving-eia": [1, 4, 1], | ||
} | ||
|
||
|
@@ -119,10 +123,15 @@ def _using_merged_images(region, framework, py_version, framework_version): | |
is_gov_region = region in VALID_ACCOUNTS_BY_REGION | ||
is_py3 = py_version == "py3" or py_version is None | ||
is_merged_versions = _is_merged_versions(framework, framework_version) | ||
|
||
return ( | ||
((not is_gov_region) or region in ASIMOV_VALID_ACCOUNTS_BY_REGION) | ||
and is_merged_versions | ||
and (is_py3 or _is_tf_14_or_later(framework, framework_version)) | ||
and ( | ||
is_py3 | ||
or _is_tf_14_or_later(framework, framework_version) | ||
or _is_pt_12_or_later(framework, framework_version) | ||
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. not in scope here, but I think it would be cleaner to maintain a constant that keeps track of which frameworks have both Python 2 & 3 support versus just Python 3 rather than writing new methods for each framework. maybe let |
||
) | ||
) | ||
|
||
|
||
|
@@ -140,6 +149,19 @@ def _is_tf_14_or_later(framework, framework_version): | |
) | ||
|
||
|
||
def _is_pt_12_or_later(framework, framework_version): | ||
""" | ||
Args: | ||
framework: Name of the frameowork | ||
framework_version: framework version | ||
""" | ||
# Asimov team now owns PyTorch 1.2.0 py2 and py3 | ||
asimov_lowest_pt = [1, 2, 0] | ||
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 think "asimov" is an internal name, and probably shouldn't be used here 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. +1 |
||
version = [int(s) for s in framework_version.split(".")] | ||
is_pytorch = framework in ("pytorch", "pytorch-serving") | ||
return is_pytorch and version >= asimov_lowest_pt[0 : len(version)] | ||
|
||
|
||
def _registry_id(region, framework, py_version, account, framework_version): | ||
""" | ||
Args: | ||
|
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.
there's also a version list at https://github.com/aws/sagemaker-python-sdk/blob/master/doc/using_pytorch.rst