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):
203203 _LOWEST_SCRIPT_MODE_ONLY_VERSION = [1 , 13 ]
204204 # 1.15.0 still supports py2
205205 # 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 ]
207207
208208 def __init__ (
209209 self ,
@@ -371,7 +371,7 @@ def _only_script_mode_supported(self):
371371
372372 def _only_python_3_supported (self ):
373373 """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
375375
376376 def _validate_requirements_file (self , requirements_file ):
377377 """Placeholder docstring"""
Original file line number Diff line number Diff line change @@ -988,6 +988,13 @@ def test_py2_version_deprecated(sagemaker_session):
988988 assert msg in str (e .value )
989989
990990
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+
991998def test_py3_is_default_version_before_tf1_14 (sagemaker_session ):
992999 estimator = _build_tf (sagemaker_session = sagemaker_session , framework_version = "1.13" )
9931000
You can’t perform that action at this time.
0 commit comments