Skip to content

Commit c0e505d

Browse files
author
Xiong Zeng
committed
Address PR comments
1 parent 15a501d commit c0e505d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sagemaker/huggingface/llm_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def get_huggingface_model_metadata(model_id: str, hf_hub_token: Optional[str] =
8181
Returns:
8282
dict: The model metadata retrieved with the HuggingFace API
8383
"""
84-
if len(model_id) == 0:
84+
if not model_id:
8585
raise ValueError("Model ID is empty. Please provide a valid Model ID.")
8686
hf_model_metadata_url = f"https://huggingface.co/api/models/{model_id}"
8787
hf_model_metadata_json = None

tests/unit/sagemaker/serve/utils/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from sagemaker.serve.utils import task
2020

21-
EXPECTED_INPUTS = {"inputs": "Paris is the <mask> of France.", "parameters": {}}
21+
EXPECTED_INPUTS = {"inputs": "Paris is the [MASK] of France.", "parameters": {}}
2222
EXPECTED_OUTPUTS = [{"sequence": "Paris is the capital of France.", "score": 0.7}]
2323
HF_INVALID_TASK = "not-present-task"
2424

0 commit comments

Comments
 (0)