Skip to content

Commit 75119e0

Browse files
committed
Added validation for AQUA tag detection in service models to ensure only AQUA-tagged models are processed.
1 parent 7ba99be commit 75119e0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ads/aqua/model/model.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,11 @@ def list(
11111111
aqua_models = []
11121112
inference_containers = self.get_container_config().to_dict().get("inference")
11131113
for model in models:
1114+
# Skip models without required tags early
1115+
freeform_tags = model.freeform_tags or {}
1116+
if Tags.AQUA_TAG.lower() not in {tag.lower() for tag in freeform_tags}:
1117+
continue
1118+
11141119
aqua_models.append(
11151120
AquaModelSummary(
11161121
**self._process_model(
@@ -1121,6 +1126,8 @@ def list(
11211126
project_id=project_id or UNKNOWN,
11221127
)
11231128
)
1129+
1130+
# Adds service models to cache
11241131
if category == SERVICE:
11251132
self._service_models_cache.__setitem__(
11261133
key=AQUA_SERVICE_MODELS, value=aqua_models

0 commit comments

Comments
 (0)