mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-27 01:25:32 +00:00
chore(misc): update datasets, benchmarks to use alpha, beta prefixes (#3891)
This will be landed together with https://github.com/llamastack/llama-stack-client-python/pull/282 (hence CI will be red on this one.) I have verified locally that tests pass with the updated version of the client-sdk.
This commit is contained in:
parent
7918188f1e
commit
0e57233a0a
3 changed files with 15 additions and 13 deletions
|
|
@ -17,17 +17,17 @@ from ..datasets.test_datasets import data_url_from_file
|
|||
|
||||
@pytest.mark.parametrize("scoring_fn_id", ["basic::equality"])
|
||||
def test_evaluate_rows(llama_stack_client, text_model_id, scoring_fn_id):
|
||||
dataset = llama_stack_client.datasets.register(
|
||||
dataset = llama_stack_client.beta.datasets.register(
|
||||
purpose="eval/messages-answer",
|
||||
source={
|
||||
"type": "uri",
|
||||
"uri": data_url_from_file(Path(__file__).parent.parent / "datasets" / "test_dataset.csv"),
|
||||
},
|
||||
)
|
||||
response = llama_stack_client.datasets.list()
|
||||
response = llama_stack_client.beta.datasets.list()
|
||||
assert any(x.identifier == dataset.identifier for x in response)
|
||||
|
||||
rows = llama_stack_client.datasets.iterrows(
|
||||
rows = llama_stack_client.beta.datasets.iterrows(
|
||||
dataset_id=dataset.identifier,
|
||||
limit=3,
|
||||
)
|
||||
|
|
@ -37,12 +37,12 @@ def test_evaluate_rows(llama_stack_client, text_model_id, scoring_fn_id):
|
|||
scoring_fn_id,
|
||||
]
|
||||
benchmark_id = str(uuid.uuid4())
|
||||
llama_stack_client.benchmarks.register(
|
||||
llama_stack_client.alpha.benchmarks.register(
|
||||
benchmark_id=benchmark_id,
|
||||
dataset_id=dataset.identifier,
|
||||
scoring_functions=scoring_functions,
|
||||
)
|
||||
list_benchmarks = llama_stack_client.benchmarks.list()
|
||||
list_benchmarks = llama_stack_client.alpha.benchmarks.list()
|
||||
assert any(x.identifier == benchmark_id for x in list_benchmarks)
|
||||
|
||||
response = llama_stack_client.alpha.eval.evaluate_rows(
|
||||
|
|
@ -66,7 +66,7 @@ def test_evaluate_rows(llama_stack_client, text_model_id, scoring_fn_id):
|
|||
|
||||
@pytest.mark.parametrize("scoring_fn_id", ["basic::subset_of"])
|
||||
def test_evaluate_benchmark(llama_stack_client, text_model_id, scoring_fn_id):
|
||||
dataset = llama_stack_client.datasets.register(
|
||||
dataset = llama_stack_client.beta.datasets.register(
|
||||
purpose="eval/messages-answer",
|
||||
source={
|
||||
"type": "uri",
|
||||
|
|
@ -74,7 +74,7 @@ def test_evaluate_benchmark(llama_stack_client, text_model_id, scoring_fn_id):
|
|||
},
|
||||
)
|
||||
benchmark_id = str(uuid.uuid4())
|
||||
llama_stack_client.benchmarks.register(
|
||||
llama_stack_client.alpha.benchmarks.register(
|
||||
benchmark_id=benchmark_id,
|
||||
dataset_id=dataset.identifier,
|
||||
scoring_functions=[scoring_fn_id],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue