Skip to content

Commit f37c6e0

Browse files
committed
removed comment and added case-insensitive match for model_task
1 parent 987b60d commit f37c6e0

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

ads/aqua/model/enums.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ class FineTuningCustomMetadata(ExtendedEnum):
2626

2727

2828
class MultiModelSupportedTaskType(ExtendedEnum):
29-
TEXT_GENERATION = "text-generation"
30-
TEXT_GENERATION_ALT = "text_generation"
29+
TEXT_GENERATION = "text_generation"
3130
IMAGE_TEXT_TO_TEXT = "image_text_to_text"
3231
CODE_SYNTHESIS = "code_synthesis"
3332
EMBEDDING = "text_embedding"

ads/aqua/model/model.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -305,16 +305,6 @@ def create_multi(
305305
# "Currently only service models are supported for multi model deployment."
306306
# )
307307

308-
# TODO uncomment the section below if only the specific types of models should be allowed for multi-model deployment
309-
# if (
310-
# source_model.freeform_tags.get(Tags.TASK, UNKNOWN).lower()
311-
# not in MultiModelSupportedTaskType
312-
# ):
313-
# raise AquaValueError(
314-
# f"Invalid or missing {Tags.TASK} tag for selected model {display_name}. "
315-
# f"Currently only `{MultiModelSupportedTaskType.values()}` models are supported for multi model deployment."
316-
# )
317-
318308
display_name_list.append(display_name)
319309

320310
self._get_task(model, source_model)
@@ -717,7 +707,7 @@ def _get_task(
717707
if not model.model_task:
718708
model.model_task = source_model.freeform_tags.get(Tags.TASK, UNKNOWN)
719709

720-
task_tag = re.sub(r"-", "_", model.model_task)
710+
task_tag = re.sub(r"-", "_", model.model_task).lower()
721711

722712
if task_tag in MultiModelSupportedTaskType:
723713
model.model_task = task_tag

0 commit comments

Comments
 (0)