Repository navigation
Interop idea: a unitxt-openeval-adapter for portable eval results #1976
Replies: 1 comment
|
Following up — I went ahead and built this. from unitxt.api import create_dataset, evaluate
from unitxt_openeval_adapter import evaluation_to_openeval
dataset = create_dataset(task="tasks.qa.open", test_set=rows, split="test", format="formats.chat_api")
results = evaluate(predictions=predictions, data=dataset)
result_set = evaluation_to_openeval(results, suite_id="my_eval_suite", run_id="run-1")
from openeval.validate import validate_result_set
assert validate_result_set(result_set).validA few real things confirmed while building it (and noted in the adapter's README): every key in an instance's Package: https://github.com/adhabnr-ux/evalport/tree/main/adapters/unitxt-openeval-adapter Also happy to open a PR upstream here instead if the team would rather the conversion live inside |
Uh oh!
There was an error while loading. Please reload this page.
EvalPort (https://github.com/adhabnr-ux/evalport) is a small open interchange spec + SDK (
evalport-sdkon PyPI) for portable LLM evaluation datasets and results — a JSON schema plusopeneval.validate.validate_suite()/validate_result_set(), so results produced by one eval framework can be read, diffed, or re-checked by another tool without re-running anything. It's adapter-based: 34 frameworks already have a thin, zero-footprintadapters/<name>-openeval-adapter/package that just converts to/from the interchange shape.Why unitxt fits well:
evaluate()inunitxt.api(as in your own README example) returns anEvaluationResults— a list of per-instance dicts, each carryingtask_data,prediction/processed_prediction,references/processed_references, and ascoredict split intoinstanceandglobal..instance_scoresflattens each instance into task_data + prediction + per-instance score fields, and.global_scoresgives the aggregateGlobalScores(score,score_name,num_of_instances, plus CI bounds whencalc_confidence_intervals=True). That's already close to EvalPort's shape — a list of per-instance results plus one aggregate summary — it just isn't in the interchange format.Sketch, using the real API:
Honest caveat:
task_datais arbitrary per task, and vision/speech tasks stuff non-text payloads into it. I'd target unitxt's very common text-in/text-out tasks first and treat other modalities'task_dataas opaque metadata rather than claim full fidelity there.If this is of interest, I'm happy to build
adapters/unitxt-openeval-adapter/— zero footprint on unitxt itself, following the pyproject convention already established across the other 34 adapters (self-referencing pinnedunitxtextra +testextra, per evalport Discussion #13) — and submit it as a PR to evalport, referencing this discussion.— Sahi, independent contributor (not affiliated with IBM or the unitxt team)
All reactions