From 5cb0ad7d7f36b2cc1953420c24225710ae0abc33 Mon Sep 17 00:00:00 2001 From: Xi Yan Date: Sat, 15 Mar 2025 14:08:01 -0700 Subject: [PATCH] openapi gen + precommit fix --- .../ondevice_distro/android_sdk.md | 2 +- llama_stack/apis/datasetio/datasetio.py | 4 +--- .../open-benchmark/open_benchmark.py | 16 ++++---------- llama_stack/templates/open-benchmark/run.yaml | 21 +++++-------------- 4 files changed, 11 insertions(+), 32 deletions(-) diff --git a/docs/source/distributions/ondevice_distro/android_sdk.md b/docs/source/distributions/ondevice_distro/android_sdk.md index 8ec8df6ee..4fa6eaf70 100644 --- a/docs/source/distributions/ondevice_distro/android_sdk.md +++ b/docs/source/distributions/ondevice_distro/android_sdk.md @@ -58,7 +58,7 @@ Breaking down the demo app, this section will show the core pieces that are used ### Setup Remote Inferencing Start a Llama Stack server on localhost. Here is an example of how you can do this using the firework.ai distribution: ``` -conda create -n stack-fireworks python=3.10 +conda create -n stack-fireworks python=3.10 conda activate stack-fireworks pip install --no-cache llama-stack==0.1.4 llama stack build --template fireworks --image-type conda diff --git a/llama_stack/apis/datasetio/datasetio.py b/llama_stack/apis/datasetio/datasetio.py index caa7c51df..e7073fd29 100644 --- a/llama_stack/apis/datasetio/datasetio.py +++ b/llama_stack/apis/datasetio/datasetio.py @@ -50,6 +50,4 @@ class DatasetIO(Protocol): ... @webmethod(route="/datasets/{dataset_id}/append-rows", method="POST") - async def append_rows( - self, dataset_id: str, rows: List[Dict[str, Any]] - ) -> None: ... + async def append_rows(self, dataset_id: str, rows: List[Dict[str, Any]]) -> None: ... diff --git a/llama_stack/templates/open-benchmark/open_benchmark.py b/llama_stack/templates/open-benchmark/open_benchmark.py index b52424f60..09ea972fa 100644 --- a/llama_stack/templates/open-benchmark/open_benchmark.py +++ b/llama_stack/templates/open-benchmark/open_benchmark.py @@ -203,18 +203,10 @@ def get_distribution_template() -> DistributionTemplate: DatasetInput( dataset_id="bfcl", provider_id="huggingface", - url=URL(uri="https://huggingface.co/datasets/llamastack/bfcl_v3"), - metadata={ - "path": "llamastack/bfcl_v3", - "split": "train", - }, - dataset_schema={ - "function": {"type": "string"}, - "language": {"type": "string"}, - "ground_truth": {"type": "string"}, - "id": {"type": "string"}, - "chat_completion_input": {"type": "string"}, - }, + purpose=DatasetPurpose.eval_messages_answer, + source=URIDataSource( + uri="huggingface://llamastack/bfcl_v3?split=train", + ), ), ] diff --git a/llama_stack/templates/open-benchmark/run.yaml b/llama_stack/templates/open-benchmark/run.yaml index 59f7941b8..3af70d565 100644 --- a/llama_stack/templates/open-benchmark/run.yaml +++ b/llama_stack/templates/open-benchmark/run.yaml @@ -186,22 +186,11 @@ datasets: metadata: {} dataset_id: math_500 provider_id: huggingface -- dataset_schema: - function: - type: string - language: - type: string - ground_truth: - type: string - id: - type: string - chat_completion_input: - type: string - url: - uri: https://huggingface.co/datasets/llamastack/bfcl_v3 - metadata: - path: llamastack/bfcl_v3 - split: train +- purpose: eval/messages-answer + source: + type: uri + uri: huggingface://llamastack/bfcl_v3?split=train + metadata: {} dataset_id: bfcl provider_id: huggingface scoring_fns: []