Skip to content

Commit 42f24db

Browse files
committed
change: throw error on TF 1.14 with EIA
1 parent 71abd6b commit 42f24db

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/sagemaker/tensorflow/serving.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def deploy(
206206

207207
def _eia_supported(self):
208208
"""Return true if TF version is EIA enabled"""
209-
return [int(s) for s in self._framework_version.split(".")] <= self.LATEST_EIA_VERSION
209+
return [int(s) for s in self._framework_version.split(".")][:2] <= self.LATEST_EIA_VERSION
210210

211211
def prepare_container_def(self, instance_type, accelerator_type=None):
212212
"""

tests/unit/test_tfs.py

+13
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,19 @@ def test_tfs_model_image_accelerator(sagemaker_session, tf_version):
9797

9898

9999
def test_tfs_model_image_accelerator_not_supported(sagemaker_session):
100+
model = Model(
101+
"s3://some/data.tar.gz",
102+
role=ROLE,
103+
framework_version="1.13.1",
104+
sagemaker_session=sagemaker_session,
105+
)
106+
107+
# assert error is not raised
108+
109+
model.deploy(
110+
instance_type="ml.c4.xlarge", initial_instance_count=1, accelerator_type="ml.eia1.medium"
111+
)
112+
100113
model = Model(
101114
"s3://some/data.tar.gz",
102115
role=ROLE,

0 commit comments

Comments
 (0)