test full generation + eval

This commit is contained in:
Xi Yan 2024-10-25 16:52:59 -07:00
parent 16620a8185
commit 247a53d393
5 changed files with 15 additions and 3 deletions

View file

@ -65,7 +65,10 @@ async def test_eval(eval_settings):
model="Llama3.2-1B-Instruct",
sampling_params=SamplingParams(),
),
scoring_functions=["subset_of"],
scoring_functions=[
"meta-reference::subset_of",
"meta-reference::llm_as_judge_8b_correctness",
],
)
assert response.job_id == "0"
job_status = await eval_impl.job_status(response.job_id)
@ -74,6 +77,8 @@ async def test_eval(eval_settings):
eval_response = await eval_impl.job_result(response.job_id)
print(eval_response)
assert eval_response is not None
assert len(eval_response.generations) == 5
assert "subset_of" in eval_response.scores
assert "meta-reference::subset_of" in eval_response.scores
assert "meta-reference::llm_as_judge_8b_correctness" in eval_response.scores