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",
|
"\n",
|
||||||
"# register the eval dataset\n",
|
"# register the eval dataset\n",
|
||||||
"response = client.datasets.register(\n",
|
"response = client.datasets.register(\n",
|
||||||
" dataset_id=\"eval_dataset\",\n",
|
" purpose=\"eval/messages-answer\",\n",
|
||||||
" provider_id=\"localfs\",\n",
|
" source={\n",
|
||||||
" url={\"uri\": data_url},\n",
|
" \"type\": \"uri\",\n",
|
||||||
" dataset_schema={\n",
|
" \"uri\": data_url,\n",
|
||||||
" \"input_query\": {\"type\": \"string\"},\n",
|
|
||||||
" \"chat_completion_input\": {\"type\": \"chat_completion_input\"},\n",
|
|
||||||
" \"expected_answer\": {\"type\": \"string\"},\n",
|
|
||||||
" },\n",
|
" },\n",
|
||||||
|
" dataset_id=\"eval_dataset\",\n",
|
||||||
")"
|
")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -4397,15 +4395,15 @@
|
||||||
"# register post training dataset\n",
|
"# register post training dataset\n",
|
||||||
"# use the below commented out version for dialog dataset\n",
|
"# use the below commented out version for dialog dataset\n",
|
||||||
"response = client.datasets.register(\n",
|
"response = client.datasets.register(\n",
|
||||||
" dataset_id=\"post_training_dataset\",\n",
|
" purpose=\"post-training/messages\",\n",
|
||||||
" provider_id=\"localfs\",\n",
|
" source={\n",
|
||||||
" url={\"uri\": data_url},\n",
|
" \"type\": \"uri\",\n",
|
||||||
" dataset_schema={\n",
|
" \"uri\": data_url,\n",
|
||||||
" \"chat_completion_input\": {\"type\": \"chat_completion_input\"},\n",
|
|
||||||
" \"expected_answer\": {\"type\": \"string\"},\n",
|
|
||||||
" },\n",
|
" },\n",
|
||||||
|
" dataset_id=\"post_training_dataset\",\n",
|
||||||
")\n",
|
")\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"\n",
|
||||||
"# response = client.datasets.register(\n",
|
"# response = client.datasets.register(\n",
|
||||||
"# dataset_id=\"post_training_dataset\",\n",
|
"# dataset_id=\"post_training_dataset\",\n",
|
||||||
"# provider_id=\"localfs\",\n",
|
"# provider_id=\"localfs\",\n",
|
||||||
|
|
|
@ -114,18 +114,12 @@ pprint(response)
|
||||||
simpleqa_dataset_id = "huggingface::simpleqa"
|
simpleqa_dataset_id = "huggingface::simpleqa"
|
||||||
|
|
||||||
_ = client.datasets.register(
|
_ = client.datasets.register(
|
||||||
|
purpose="eval/messages-answer",
|
||||||
|
source={
|
||||||
|
"type": "uri",
|
||||||
|
"uri": "huggingface://datasets/llamastack/simpleqa?split=train",
|
||||||
|
},
|
||||||
dataset_id=simpleqa_dataset_id,
|
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(
|
eval_rows = client.datasets.iterrows(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue