From 95619892eae03d13a9030aeb609781759da916be Mon Sep 17 00:00:00 2001 From: Jash Gulabrai Date: Tue, 15 Apr 2025 09:47:58 -0400 Subject: [PATCH] Revert model in ModelCandidate to type string --- docs/_static/llama-stack-spec.html | 31 +----------------------------- docs/_static/llama-stack-spec.yaml | 12 +----------- llama_stack/apis/eval/eval.py | 2 +- 3 files changed, 3 insertions(+), 42 deletions(-) diff --git a/docs/_static/llama-stack-spec.html b/docs/_static/llama-stack-spec.html index 7971acfac..4ba5e67a2 100644 --- a/docs/_static/llama-stack-spec.html +++ b/docs/_static/llama-stack-spec.html @@ -6466,36 +6466,7 @@ "default": "model" }, "model": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] - } - } - ], + "type": "string", "description": "The model ID to evaluate." }, "sampling_params": { diff --git a/docs/_static/llama-stack-spec.yaml b/docs/_static/llama-stack-spec.yaml index 7cd2ffb58..7342c4ea6 100644 --- a/docs/_static/llama-stack-spec.yaml +++ b/docs/_static/llama-stack-spec.yaml @@ -4553,17 +4553,7 @@ components: const: model default: model model: - oneOf: - - type: string - - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object + type: string description: The model ID to evaluate. sampling_params: $ref: '#/components/schemas/SamplingParams' diff --git a/llama_stack/apis/eval/eval.py b/llama_stack/apis/eval/eval.py index f9bb9a171..a3a4c0c3d 100644 --- a/llama_stack/apis/eval/eval.py +++ b/llama_stack/apis/eval/eval.py @@ -27,7 +27,7 @@ class ModelCandidate(BaseModel): """ type: Literal["model"] = "model" - model: Union[str, Dict[str, Any]] + model: str sampling_params: Optional[SamplingParams] = Field(default_factory=SamplingParams) system_message: Optional[SystemMessage] = None