mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 07:14:20 +00:00
eleuther eval fix
This commit is contained in:
parent
ad18dc94ac
commit
fb565dfb06
3 changed files with 24 additions and 20 deletions
|
@ -54,27 +54,29 @@ class EvaluationClient(Evals):
|
||||||
async def run_main(host: str, port: int):
|
async def run_main(host: str, port: int):
|
||||||
client = EvaluationClient(f"http://{host}:{port}")
|
client = EvaluationClient(f"http://{host}:{port}")
|
||||||
|
|
||||||
# CustomDataset
|
# Custom Eval Task
|
||||||
|
# response = await client.run_evals(
|
||||||
|
# model="Llama3.1-8B-Instruct",
|
||||||
|
# dataset="mmlu-simple-eval-en",
|
||||||
|
# task="mmlu",
|
||||||
|
# eval_task_config=EvaluateTaskConfig(
|
||||||
|
# n_samples=2,
|
||||||
|
# ),
|
||||||
|
# )
|
||||||
|
|
||||||
|
# Eleuther Eval Task
|
||||||
response = await client.run_evals(
|
response = await client.run_evals(
|
||||||
model="Llama3.1-8B-Instruct",
|
model="Llama3.1-8B-Instruct",
|
||||||
dataset="mmlu-simple-eval-en",
|
# task="meta_mmlu_pro_instruct",
|
||||||
task="mmlu",
|
task="meta_ifeval",
|
||||||
eval_task_config=EvaluateTaskConfig(
|
eval_task_config=EvaluateTaskConfig(
|
||||||
n_samples=2,
|
n_samples=2,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
cprint(f"evaluate response={response}", "green")
|
if response.formatted_report:
|
||||||
|
cprint(response.formatted_report, "green")
|
||||||
# Eleuther Eval Task
|
else:
|
||||||
# response = await client.run_evals(
|
cprint(f"evaluate response={response}", "green")
|
||||||
# model="Llama3.1-8B-Instruct",
|
|
||||||
# task="meta_mmlu_pro_instruct",
|
|
||||||
# # task="meta_ifeval",
|
|
||||||
# eval_task_config=EvaluateTaskConfig(
|
|
||||||
# n_samples=2,
|
|
||||||
# )
|
|
||||||
# )
|
|
||||||
# cprint(response.metrics["metrics_table"], "red")
|
|
||||||
|
|
||||||
|
|
||||||
def main(host: str, port: int):
|
def main(host: str, port: int):
|
||||||
|
|
|
@ -157,12 +157,14 @@ class EleutherEvalsAdapter(Evals):
|
||||||
limit=eval_task_config.n_samples,
|
limit=eval_task_config.n_samples,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
eval_result = EvalResult(
|
||||||
|
metrics={},
|
||||||
|
)
|
||||||
formatted_output = lm_eval.utils.make_table(output)
|
formatted_output = lm_eval.utils.make_table(output)
|
||||||
|
|
||||||
cprint(formatted_output, "green")
|
cprint(formatted_output, "green")
|
||||||
|
|
||||||
return EvaluateResponse(
|
return EvaluateResponse(
|
||||||
metrics={
|
eval_result=eval_result,
|
||||||
"metrics_table": formatted_output,
|
formatted_report=formatted_output,
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -14,8 +14,8 @@ apis:
|
||||||
- evals
|
- evals
|
||||||
providers:
|
providers:
|
||||||
evals:
|
evals:
|
||||||
- provider_id: meta-reference
|
- provider_id: eleuther
|
||||||
provider_type: meta-reference
|
provider_type: eleuther
|
||||||
config: {}
|
config: {}
|
||||||
inference:
|
inference:
|
||||||
- provider_id: remote::tgi
|
- provider_id: remote::tgi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue