Skip to content

Commit 6dcf448

Browse files
committed
chore: address git comments
1 parent 3b1888b commit 6dcf448

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

tests/unit/sagemaker/jumpstart/utils.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,17 @@ def get_spec_from_base_spec(
103103
if version and semantic_version_str:
104104
raise ValueError("Cannot specify both `version` and `semantic_version_str` fields.")
105105

106-
if (
107-
"pytorch" not in model_id
108-
and "tensorflow" not in model_id
109-
and "huggingface" not in model_id
110-
and "mxnet" not in model_id
111-
and "xgboost" not in model_id
112-
and "catboost" not in model_id
113-
and "lightgbm" not in model_id
114-
and "sklearn" not in model_id
106+
if all(
107+
[
108+
"pytorch" not in model_id,
109+
"tensorflow" not in model_id,
110+
"huggingface" not in model_id,
111+
"mxnet" not in model_id,
112+
"xgboost" not in model_id,
113+
"catboost" not in model_id,
114+
"lightgbm" not in model_id,
115+
"sklearn" not in model_id,
116+
]
115117
):
116118
raise KeyError("Bad model id")
117119

0 commit comments

Comments
 (0)