Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 76 additions & 1 deletion src/sagemaker/image_uri_config/tensorflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@
"2.8": "2.8.4",
"2.9": "2.9.3",
"2.10": "2.10.1",
"2.11": "2.11.0"
"2.11": "2.11.1",
"2.12": "2.12.1"
},
"versions": {
"1.10.0": {
Expand Down Expand Up @@ -1938,6 +1939,80 @@
"us-west-2": "763104351884"
},
"repository": "tensorflow-inference"
},
"2.11.1": {
"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-south-2": "772153158452",
"ap-southeast-1": "763104351884",
"ap-southeast-2": "763104351884",
"ap-southeast-3": "907027046896",
"ap-southeast-4": "457447274322",
"ca-central-1": "763104351884",
"cn-north-1": "727897471807",
"cn-northwest-1": "727897471807",
"eu-central-1": "763104351884",
"eu-central-2": "380420809688",
"eu-north-1": "763104351884",
"eu-south-1": "692866216735",
"eu-south-2": "503227376785",
"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-east-1": "446045086412",
"us-gov-west-1": "442386744353",
"us-iso-east-1": "886529160074",
"us-isob-east-1": "094389454867",
"us-west-1": "763104351884",
"us-west-2": "763104351884"
},
"repository": "tensorflow-inference"
},
"2.12.1": {
"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-south-2": "772153158452",
"ap-southeast-1": "763104351884",
"ap-southeast-2": "763104351884",
"ap-southeast-3": "907027046896",
"ap-southeast-4": "457447274322",
"ca-central-1": "763104351884",
"cn-north-1": "727897471807",
"cn-northwest-1": "727897471807",
"eu-central-1": "763104351884",
"eu-central-2": "380420809688",
"eu-north-1": "763104351884",
"eu-south-1": "692866216735",
"eu-south-2": "503227376785",
"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-east-1": "446045086412",
"us-gov-west-1": "442386744353",
"us-iso-east-1": "886529160074",
"us-isob-east-1": "094389454867",
"us-west-1": "763104351884",
"us-west-2": "763104351884"
},
"repository": "tensorflow-inference"
}
}
},
Expand Down
12 changes: 11 additions & 1 deletion src/sagemaker/tensorflow/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ def __init__(
)
self.framework_version = framework_version

# Inference framework version is being introduced to accomodate the mismatch between
# tensorflow and tensorflow serving releases, wherein the TF and TFS might have different
# patch versions, but end up hosting the model of same TF version. For eg., the upstream
# TFS-2.12.0 release was a bad release and hence a new TFS-2.12.1 release was made to host
# models from TF-2.12.0.
training_inference_version_mismatch_dict = {"2.12.0": "2.12.1"}
self.inference_framework_version = training_inference_version_mismatch_dict.get(
framework_version, framework_version
)

super(TensorFlowModel, self).__init__(
model_data=model_data,
role=role,
Expand Down Expand Up @@ -463,7 +473,7 @@ def _get_image_uri(
return image_uris.retrieve(
self._framework_name,
region_name or self.sagemaker_session.boto_region_name,
version=self.framework_version,
version=self.inference_framework_version,
instance_type=instance_type,
accelerator_type=accelerator_type,
image_scope="inference",
Expand Down
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,9 @@ def tf_full_py_version(tf_full_version):
return "py37"
if version < Version("2.8"):
return "py38"
return "py39"
if version < Version("2.12"):
return "py39"
return "py310"


@pytest.fixture(scope="module")
Expand Down