Skip to content

Commit 761b92c

Browse files
committed
Update according to black and pylint
1 parent 285a10e commit 761b92c

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/sagemaker/image_uris.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def _get_image_tag(
339339
# Triton images don't have a trailing -gpu tag. Only -cpu images do.
340340
if framework == SAGEMAKER_TRITONSERVER_FRAMEWORK:
341341
if processor == "gpu":
342-
tag = tag.rstrip(f"-gpu")
342+
tag = tag.rstrip("-gpu")
343343

344344
return tag
345345

tests/unit/sagemaker/image_uris/expected_uris.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def djl_framework_uri(repo, account, tag, region=REGION):
8383
domain = ALTERNATE_DOMAINS.get(region, DOMAIN)
8484
return IMAGE_URI_FORMAT.format(account, region, domain, repo, tag)
8585

86+
8687
def sagemaker_triton_framework_uri(repo, account, tag, processor="gpu", region=REGION):
8788
domain = ALTERNATE_DOMAINS.get(region, DOMAIN)
8889
if processor == "cpu":

tests/unit/sagemaker/image_uris/test_sagemaker_tritonserver.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717

1818
INSTANCE_TYPES = {"cpu": "ml.c4.xlarge", "gpu": "ml.p2.xlarge"}
1919

20+
2021
@pytest.mark.parametrize(
2122
"load_config_and_file_name",
22-
[
23-
"sagemaker-tritonserver.json"
24-
],
23+
["sagemaker-tritonserver.json"],
2524
indirect=True,
2625
)
2726
def test_sagemaker_tritonserver_uris(load_config_and_file_name):
@@ -35,11 +34,17 @@ def test_sagemaker_tritonserver_uris(load_config_and_file_name):
3534
for processor in processors:
3635
instance_type = INSTANCE_TYPES[processor]
3736
for region in ACCOUNTS.keys():
38-
_test_sagemaker_tritonserver_uris(ACCOUNTS[region], region, version, tag, framework, instance_type, processor)
37+
_test_sagemaker_tritonserver_uris(
38+
ACCOUNTS[region], region, version, tag, framework, instance_type, processor
39+
)
3940

4041

41-
def _test_sagemaker_tritonserver_uris(account, region, version, tag, triton_framework, instance_type, processor):
42-
uri = image_uris.retrieve(framework=triton_framework, region=region, version=version, instance_type=instance_type)
42+
def _test_sagemaker_tritonserver_uris(
43+
account, region, version, tag, triton_framework, instance_type, processor
44+
):
45+
uri = image_uris.retrieve(
46+
framework=triton_framework, region=region, version=version, instance_type=instance_type
47+
)
4348
expected = expected_uris.sagemaker_triton_framework_uri(
4449
"sagemaker-tritonserver",
4550
account,

0 commit comments

Comments
 (0)