Skip to content

Commit 8bef3f0

Browse files
Yixiao99wanyixiaicywang86rui
authored
change: add compilation option for ml_eia2 (#2242)
* change: add compilation option for ml_eia2 * revise comments * change: upgrade TF Serving version to TF2.3.0 * change: revise integration test for compilation * change: revise integ test * change: revise version config * change: revise for compilation * change: revise format * change: remove test * change: revise comment * change:add test for compilation * change: revise compilation test * change: remove compilationn test * change: revise unit test Co-authored-by: wanyixia <[email protected]> Co-authored-by: icywang86rui <[email protected]>
1 parent b7b4549 commit 8bef3f0

File tree

4 files changed

+41
-4
lines changed

4 files changed

+41
-4
lines changed

src/sagemaker/image_uri_config/tensorflow.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"1.13": "1.13.0",
1111
"1.14": "1.14.0",
1212
"1.15": "1.15.0",
13-
"2.0": "2.0.0"
13+
"2.0": "2.0.0",
14+
"2.3": "2.3.0"
1415
},
1516
"versions": {
1617
"1.10.0": {
@@ -218,6 +219,35 @@
218219
"us-west-2": "763104351884"
219220
},
220221
"repository": "tensorflow-inference-eia"
222+
},
223+
"2.3.0": {
224+
"registries": {
225+
"af-south-1": "626614931356",
226+
"ap-east-1": "871362719292",
227+
"ap-northeast-1": "763104351884",
228+
"ap-northeast-2": "763104351884",
229+
"ap-south-1": "763104351884",
230+
"ap-southeast-1": "763104351884",
231+
"ap-southeast-2": "763104351884",
232+
"ca-central-1": "763104351884",
233+
"cn-north-1": "727897471807",
234+
"cn-northwest-1": "727897471807",
235+
"eu-central-1": "763104351884",
236+
"eu-north-1": "763104351884",
237+
"eu-south-1": "692866216735",
238+
"eu-west-1": "763104351884",
239+
"eu-west-2": "763104351884",
240+
"eu-west-3": "763104351884",
241+
"me-south-1": "217643126080",
242+
"sa-east-1": "763104351884",
243+
"us-east-1": "763104351884",
244+
"us-east-2": "763104351884",
245+
"us-gov-west-1": "442386744353",
246+
"us-iso-east-1": "886529160074",
247+
"us-west-1": "763104351884",
248+
"us-west-2": "763104351884"
249+
},
250+
"repository": "tensorflow-inference-eia"
221251
}
222252
}
223253
},

src/sagemaker/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,9 @@ def compile(
651651
job_status = self.sagemaker_session.wait_for_compilation_job(job_name)
652652
self.model_data = job_status["ModelArtifacts"]["S3ModelArtifacts"]
653653
if target_instance_family is not None:
654-
if target_instance_family.startswith("ml_"):
654+
if target_instance_family == "ml_eia2":
655+
pass
656+
elif target_instance_family.startswith("ml_"):
655657
self.image_uri = self._compilation_image_uri(
656658
self.sagemaker_session.boto_region_name,
657659
target_instance_family,

src/sagemaker/tensorflow/model.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class TensorFlowModel(sagemaker.model.FrameworkModel):
118118
logging.ERROR: "error",
119119
logging.CRITICAL: "crit",
120120
}
121-
LATEST_EIA_VERSION = [2, 0]
121+
LATEST_EIA_VERSION = [2, 3]
122122

123123
def __init__(
124124
self,
@@ -289,7 +289,12 @@ def deploy(
289289

290290
def _eia_supported(self):
291291
"""Return true if TF version is EIA enabled"""
292-
return [int(s) for s in self.framework_version.split(".")][:2] <= self.LATEST_EIA_VERSION
292+
framework_version = [int(s) for s in self.framework_version.split(".")][:2]
293+
return (
294+
framework_version != [2, 1]
295+
and framework_version != [2, 2]
296+
and framework_version <= self.LATEST_EIA_VERSION
297+
)
293298

294299
def prepare_container_def(self, instance_type=None, accelerator_type=None):
295300
"""Prepare the container definition.

tests/data/cuteCat.jpg

6.43 KB
Loading

0 commit comments

Comments
 (0)