Skip to content

feature: Add support for TF 2.8 #3000

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

Merged
merged 11 commits into from
Mar 18, 2022
Merged
2 changes: 2 additions & 0 deletions src/sagemaker/fw_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
"2.6.0",
"2.6.2",
"2.6.3",
"2.8",
"2.8.0",
],
"pytorch": [
"1.6",
Expand Down
69 changes: 67 additions & 2 deletions src/sagemaker/image_uri_config/tensorflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@
"2.3": "2.3.2",
"2.4": "2.4.3",
"2.5": "2.5.1",
"2.6": "2.6.3"
"2.6": "2.6.3",
"2.8": "2.8.0"
},
"versions": {
"1.10.0": {
Expand Down Expand Up @@ -1373,6 +1374,36 @@
"us-west-2": "763104351884"
},
"repository": "tensorflow-inference"
},
"2.8.0": {
"registries": {
"af-south-1": "626614931356",
"ap-east-1": "871362719292",
"ap-northeast-1": "763104351884",
"ap-northeast-2": "763104351884",
"ap-northeast-3": "364406365360",
"ap-south-1": "763104351884",
"ap-southeast-1": "763104351884",
"ap-southeast-2": "763104351884",
"ca-central-1": "763104351884",
"cn-north-1": "727897471807",
"cn-northwest-1": "727897471807",
"eu-central-1": "763104351884",
"eu-north-1": "763104351884",
"eu-south-1": "692866216735",
"eu-west-1": "763104351884",
"eu-west-2": "763104351884",
"eu-west-3": "763104351884",
"me-south-1": "217643126080",
"sa-east-1": "763104351884",
"us-east-1": "763104351884",
"us-east-2": "763104351884",
"us-gov-west-1": "442386744353",
"us-iso-east-1": "886529160074",
"us-west-1": "763104351884",
"us-west-2": "763104351884"
},
"repository": "tensorflow-inference"
}
}
},
Expand Down Expand Up @@ -1400,7 +1431,8 @@
"2.3": "2.3.2",
"2.4": "2.4.3",
"2.5": "2.5.1",
"2.6": "2.6.3"
"2.6": "2.6.3",
"2.8": "2.8.0"
},
"versions": {
"1.10.0": {
Expand Down Expand Up @@ -2692,6 +2724,39 @@
"us-west-2": "763104351884"
},
"repository": "tensorflow-training"
},
"2.8.0": {
"py_versions": [
"py39"
],
"registries": {
"af-south-1": "626614931356",
"ap-east-1": "871362719292",
"ap-northeast-1": "763104351884",
"ap-northeast-2": "763104351884",
"ap-northeast-3": "364406365360",
"ap-south-1": "763104351884",
"ap-southeast-1": "763104351884",
"ap-southeast-2": "763104351884",
"ca-central-1": "763104351884",
"cn-north-1": "727897471807",
"cn-northwest-1": "727897471807",
"eu-central-1": "763104351884",
"eu-north-1": "763104351884",
"eu-south-1": "692866216735",
"eu-west-1": "763104351884",
"eu-west-2": "763104351884",
"eu-west-3": "763104351884",
"me-south-1": "217643126080",
"sa-east-1": "763104351884",
"us-east-1": "763104351884",
"us-east-2": "763104351884",
"us-gov-west-1": "442386744353",
"us-iso-east-1": "886529160074",
"us-west-1": "763104351884",
"us-west-2": "763104351884"
},
"repository": "tensorflow-training"
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,9 @@ def _tf_py_version(tf_version, request):
return request.param
if Version("2.2") <= version < Version("2.6"):
return "py37"
return "py38"
if Version("2.6") <= version < Version("2.8"):
return "py38"
return "py39"


@pytest.fixture(scope="module")
Expand Down Expand Up @@ -384,7 +386,9 @@ def tf_full_py_version(tf_full_version):
return "py3"
if version < Version("2.6"):
return "py37"
return "py38"
if version < Version("2.8"):
return "py38"
return "py39"


@pytest.fixture(scope="session")
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/test_fw_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ def test_validate_smdataparallel_args_not_raises():
("ml.p3.16xlarge", "tensorflow", "2.3.2", "py37", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.3", "py37", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.4.1", "py37", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.4.3", "py37", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.4", "py37", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.5.0", "py37", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.5.1", "py37", smdataparallel_enabled),
Expand All @@ -686,6 +687,8 @@ def test_validate_smdataparallel_args_not_raises():
("ml.p3.16xlarge", "tensorflow", "2.6.2", "py38", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.6.3", "py38", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.6", "py38", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.8.0", "py39", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.8", "py39", smdataparallel_enabled),
("ml.p3.16xlarge", "pytorch", "1.6.0", "py3", smdataparallel_enabled),
("ml.p3.16xlarge", "pytorch", "1.6", "py3", smdataparallel_enabled),
("ml.p3.16xlarge", "pytorch", "1.7.1", "py3", smdataparallel_enabled),
Expand All @@ -698,10 +701,13 @@ def test_validate_smdataparallel_args_not_raises():
("ml.p3.16xlarge", "pytorch", "1.10", "py38", smdataparallel_enabled),
("ml.p3.16xlarge", "tensorflow", "2.4.1", "py3", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "tensorflow", "2.4.1", "py37", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "tensorflow", "2.4.3", "py3", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "tensorflow", "2.4.3", "py37", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "tensorflow", "2.5.1", "py37", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "tensorflow", "2.6.0", "py38", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "tensorflow", "2.6.2", "py38", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "tensorflow", "2.6.3", "py38", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "tensorflow", "2.8.0", "py39", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "pytorch", "1.8.0", "py3", smdataparallel_enabled_custom_mpi),
("ml.p3.16xlarge", "pytorch", "1.9.1", "py38", smdataparallel_enabled_custom_mpi),
]
Expand Down