38
38
39
39
NO_T2_REGIONS = ["eu-north-1" , "ap-east-1" , "me-south-1" ]
40
40
41
- # TODO: refactor handling of versions, repo, image uris, validations for all frameworks
42
- TENSORFLOW_LATEST_VERSION = "2.2.0"
43
- TENSORFLOW_LATEST_1X_VERSION = "1.15.2"
44
-
45
41
46
42
def pytest_addoption (parser ):
47
43
parser .addoption ("--sagemaker-client-config" , action = "store" , default = None )
@@ -63,7 +59,7 @@ def pytest_addoption(parser):
63
59
"--rl-ray-full-version" , action = "store" , default = RLEstimator .RAY_LATEST_VERSION
64
60
)
65
61
parser .addoption ("--sklearn-full-version" , action = "store" , default = "0.20.0" )
66
- parser .addoption ("--tf-full-version" , action = "store" )
62
+ parser .addoption ("--tf-full-version" , action = "store" , default = "2.2.0" )
67
63
parser .addoption ("--ei-tf-full-version" , action = "store" )
68
64
parser .addoption ("--xgboost-full-version" , action = "store" , default = "1.0-1" )
69
65
@@ -289,8 +285,8 @@ def sklearn_full_version(request):
289
285
return request .config .getoption ("--sklearn-full-version" )
290
286
291
287
292
- @pytest .fixture (scope = "module" , params = [ TENSORFLOW_LATEST_VERSION ] )
293
- def tf_latest_version (request ):
288
+ @pytest .fixture (scope = "module" )
289
+ def tf_latest_version (request , tf_full_version ):
294
290
return request .param
295
291
296
292
@@ -299,27 +295,18 @@ def tf_latest_py_version():
299
295
return "py37"
300
296
301
297
302
- @pytest .fixture (scope = "module" , params = [TENSORFLOW_LATEST_1X_VERSION ])
303
- def tf_latest_1x_version (request ):
304
- return request .param
305
-
306
-
307
298
@pytest .fixture (scope = "module" )
308
299
def tf_latest_serving_version ():
309
300
return "2.1.0"
310
301
311
302
312
- @pytest .fixture (scope = "module" , params = [ TENSORFLOW_LATEST_VERSION , TENSORFLOW_LATEST_1X_VERSION ] )
303
+ @pytest .fixture (scope = "module" )
313
304
def tf_full_version (request ):
314
- tf_version = request .config .getoption ("--tf-full-version" )
315
- if tf_version is None :
316
- return request .param
317
- else :
318
- return tf_version
305
+ return request .config .getoption ("--tf-full-version" )
319
306
320
307
321
308
@pytest .fixture (scope = "module" )
322
- def tf_full_py_version (tf_full_version , tf_latest_version , tf_latest_1x_version ):
309
+ def tf_full_py_version (tf_full_version ):
323
310
"""fixture to match tf_full_version
324
311
325
312
Fixture exists as such, since tf_full_version may be overridden --tf-full-version.
@@ -330,9 +317,9 @@ def tf_full_py_version(tf_full_version, tf_latest_version, tf_latest_1x_version)
330
317
version = [int (val ) for val in tf_full_version .split ("." )]
331
318
if version < [1 , 11 ]:
332
319
return "py2"
333
- if tf_full_version in [ tf_latest_version , tf_latest_1x_version ]:
334
- return "py37 "
335
- return "py3 "
320
+ if version < [ 2 , 2 ]:
321
+ return "py3 "
322
+ return "py37 "
336
323
337
324
338
325
@pytest .fixture (scope = "module" )
0 commit comments