Skip to content

Commit 3bcc438

Browse files
author
zxy844288792
committed
feature: change neo region check API to check_neo_support
1 parent 51559f9 commit 3bcc438

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/sagemaker/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def _compilation_job_config(self, target_instance_type, input_shape, output_path
149149
'tags': tags,
150150
'job_name': job_name}
151151

152-
def check_neo_region(self, region):
152+
def check_neo_support(self, region):
153153
"""Check if this ``Model`` in the available region where neo support.
154154
155155
Args:

tests/unit/test_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def test_compile_model_for_cloud(sagemaker_session, tmpdir):
402402
assert model._is_compiled_model is True
403403

404404

405-
def test_check_neo_region(sagemaker_session, tmpdir):
405+
def test_check_neo_support(sagemaker_session, tmpdir):
406406
sagemaker_session.wait_for_compilation_job = Mock(
407407
return_value=DESCRIBE_COMPILATION_JOB_RESPONSE)
408408
model = DummyFrameworkModel(sagemaker_session, source_dir=str(tmpdir))
@@ -413,6 +413,6 @@ def test_check_neo_region(sagemaker_session, tmpdir):
413413
neo_support_region = ['us-west-2', 'eu-west-1', 'us-east-1', 'us-east-2']
414414
for region_name in ec2_region_list:
415415
if region_name in neo_support_region:
416-
assert model.check_neo_region(region_name) is True
416+
assert model.check_neo_support(region_name) is True
417417
else:
418-
assert model.check_neo_region(region_name) is False
418+
assert model.check_neo_support(region_name) is False

0 commit comments

Comments
 (0)