unregister

This commit is contained in:
Xi Yan 2025-03-15 16:37:46 -07:00
parent cf225c9710
commit 4fee3af91f
4 changed files with 79 additions and 96 deletions

View file

@ -10,11 +10,27 @@ from rich.pretty import pprint
def test_register_dataset():
client = LlamaStackClient(base_url="http://localhost:8321")
# dataset = client.datasets.register(
# purpose="eval/messages-answer",
# source={
# "type": "uri",
# "uri": "huggingface://datasets/llamastack/simpleqa?split=train",
# },
# )
dataset = client.datasets.register(
purpose="eval/messages-answer",
source={
"type": "uri",
"uri": "huggingface://datasets/llamastack/simpleqa?split=train",
"type": "rows",
"rows": [
{
"messages": [{"role": "user", "content": "Hello, world!"}],
"answer": "Hello, world!",
},
{
"messages": [{"role": "user", "content": "What is the capital of France?"}],
"answer": "Paris",
},
],
},
)
dataset_id = dataset.identifier