File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ class TensorFlow(Framework):
203
203
_LOWEST_SCRIPT_MODE_ONLY_VERSION = [1 , 13 ]
204
204
# 1.15.0 still supports py2
205
205
# we will need to update this version number if future versions still support py2
206
- _HIGHEST_PYTHON_2_VERSION = [1 , 15 ]
206
+ _HIGHEST_PYTHON_2_VERSION = [1 , 15 , 0 ]
207
207
208
208
def __init__ (
209
209
self ,
@@ -371,7 +371,7 @@ def _only_script_mode_supported(self):
371
371
372
372
def _only_python_3_supported (self ):
373
373
"""Placeholder docstring"""
374
- return [int (s ) for s in self .framework_version .split ("." )] >= self ._HIGHEST_PYTHON_2_VERSION
374
+ return [int (s ) for s in self .framework_version .split ("." )] > self ._HIGHEST_PYTHON_2_VERSION
375
375
376
376
def _validate_requirements_file (self , requirements_file ):
377
377
"""Placeholder docstring"""
Original file line number Diff line number Diff line change @@ -988,6 +988,13 @@ def test_py2_version_deprecated(sagemaker_session):
988
988
assert msg in str (e .value )
989
989
990
990
991
+ def test_py2_version_is_not_deprecated (sagemaker_session ):
992
+ estimator = _build_tf (
993
+ sagemaker_session = sagemaker_session , framework_version = "1.15.0" , py_version = "py2"
994
+ )
995
+ assert estimator .py_version == "py2"
996
+
997
+
991
998
def test_py3_is_default_version_before_tf1_14 (sagemaker_session ):
992
999
estimator = _build_tf (sagemaker_session = sagemaker_session , framework_version = "1.13" )
993
1000
You can’t perform that action at this time.
0 commit comments