mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-07 11:08:20 +00:00
fix notebook
This commit is contained in:
parent
ca5a6a525d
commit
06f01f95c1
2 changed files with 16 additions and 24 deletions
|
@ -3535,14 +3535,12 @@
|
|||
"\n",
|
||||
"# register the eval dataset\n",
|
||||
"response = client.datasets.register(\n",
|
||||
" dataset_id=\"eval_dataset\",\n",
|
||||
" provider_id=\"localfs\",\n",
|
||||
" url={\"uri\": data_url},\n",
|
||||
" dataset_schema={\n",
|
||||
" \"input_query\": {\"type\": \"string\"},\n",
|
||||
" \"chat_completion_input\": {\"type\": \"chat_completion_input\"},\n",
|
||||
" \"expected_answer\": {\"type\": \"string\"},\n",
|
||||
" purpose=\"eval/messages-answer\",\n",
|
||||
" source={\n",
|
||||
" \"type\": \"uri\",\n",
|
||||
" \"uri\": data_url,\n",
|
||||
" },\n",
|
||||
" dataset_id=\"eval_dataset\",\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
|
@ -4397,15 +4395,15 @@
|
|||
"# register post training dataset\n",
|
||||
"# use the below commented out version for dialog dataset\n",
|
||||
"response = client.datasets.register(\n",
|
||||
" dataset_id=\"post_training_dataset\",\n",
|
||||
" provider_id=\"localfs\",\n",
|
||||
" url={\"uri\": data_url},\n",
|
||||
" dataset_schema={\n",
|
||||
" \"chat_completion_input\": {\"type\": \"chat_completion_input\"},\n",
|
||||
" \"expected_answer\": {\"type\": \"string\"},\n",
|
||||
" purpose=\"post-training/messages\",\n",
|
||||
" source={\n",
|
||||
" \"type\": \"uri\",\n",
|
||||
" \"uri\": data_url,\n",
|
||||
" },\n",
|
||||
" dataset_id=\"post_training_dataset\",\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# response = client.datasets.register(\n",
|
||||
"# dataset_id=\"post_training_dataset\",\n",
|
||||
"# provider_id=\"localfs\",\n",
|
||||
|
|
|
@ -114,18 +114,12 @@ pprint(response)
|
|||
simpleqa_dataset_id = "huggingface::simpleqa"
|
||||
|
||||
_ = client.datasets.register(
|
||||
purpose="eval/messages-answer",
|
||||
source={
|
||||
"type": "uri",
|
||||
"uri": "huggingface://datasets/llamastack/simpleqa?split=train",
|
||||
},
|
||||
dataset_id=simpleqa_dataset_id,
|
||||
provider_id="huggingface",
|
||||
url={"uri": "https://huggingface.co/datasets/llamastack/simpleqa"},
|
||||
metadata={
|
||||
"path": "llamastack/simpleqa",
|
||||
"split": "train",
|
||||
},
|
||||
dataset_schema={
|
||||
"input_query": {"type": "string"},
|
||||
"expected_answer": {"type": "string"},
|
||||
"chat_completion_input": {"type": "chat_completion_input"},
|
||||
},
|
||||
)
|
||||
|
||||
eval_rows = client.datasets.iterrows(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue