diff --git a/docs/_static/llama-stack-spec.html b/docs/_static/llama-stack-spec.html index 44459f2b9..f7166bb65 100644 --- a/docs/_static/llama-stack-spec.html +++ b/docs/_static/llama-stack-spec.html @@ -9448,7 +9448,7 @@ }, "source": { "$ref": "#/components/schemas/DataSource", - "description": "The data source of the dataset. Examples: - { \"type\": \"uri\", \"uri\": \"https://mywebsite.com/mydata.jsonl\" } - { \"type\": \"uri\", \"uri\": \"lsfs://mydata.jsonl\" } - { \"type\": \"huggingface\", \"dataset_path\": \"tatsu-lab/alpaca\", \"params\": { \"split\": \"train\" } } - { \"type\": \"rows\", \"rows\": [ { \"messages\": [ {\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}, ] } ] }" + "description": "The data source of the dataset. Examples: - { \"type\": \"uri\", \"uri\": \"https://mywebsite.com/mydata.jsonl\" } - { \"type\": \"uri\", \"uri\": \"lsfs://mydata.jsonl\" } - { \"type\": \"huggingface\", \"huggingface\": { \"dataset_path\": \"tatsu-lab/alpaca\", \"params\": { \"split\": \"train\" } } } - { \"type\": \"rows\", \"rows\": [ { \"messages\": [ {\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}, ] } ] }" }, "metadata": { "type": "object", diff --git a/docs/_static/llama-stack-spec.yaml b/docs/_static/llama-stack-spec.yaml index a257b2a7d..10db07f02 100644 --- a/docs/_static/llama-stack-spec.yaml +++ b/docs/_static/llama-stack-spec.yaml @@ -6404,10 +6404,10 @@ components: description: >- The data source of the dataset. Examples: - { "type": "uri", "uri": "https://mywebsite.com/mydata.jsonl" } - { "type": "uri", "uri": "lsfs://mydata.jsonl" } - { "type": "huggingface", - "dataset_path": "tatsu-lab/alpaca", "params": { "split": "train" } } - - { "type": "rows", "rows": [ { "messages": [ {"role": "user", "content": - "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}, ] - } ] } + "huggingface": { "dataset_path": "tatsu-lab/alpaca", "params": { "split": + "train" } } } - { "type": "rows", "rows": [ { "messages": [ {"role": "user", + "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, + world!"}, ] } ] } metadata: type: object additionalProperties: diff --git a/llama_stack/apis/datasets/datasets.py b/llama_stack/apis/datasets/datasets.py index 20587a29e..71118667f 100644 --- a/llama_stack/apis/datasets/datasets.py +++ b/llama_stack/apis/datasets/datasets.py @@ -23,6 +23,13 @@ class DatasetPurpose(Enum): {"role": "assistant", "content": "Hello, world!"}, ] } + :cvar eval/question-answer: The dataset contains a question and answer column. + { + "question": [ + {"role": "user", "content": "What is the capital of France?"}, + ], + "answer": "Paris" + } """ post_training_messages = "post-training/messages" @@ -157,9 +164,11 @@ class Datasets(Protocol): } - { "type": "huggingface", - "dataset_path": "tatsu-lab/alpaca", - "params": { - "split": "train" + "huggingface": { + "dataset_path": "tatsu-lab/alpaca", + "params": { + "split": "train" + } } } - {