evaluation-and-fusion
Evaluate Pyserini run files, convert run formats, fuse retrieval runs, and use reproducibility matrices safely.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- evaluation-and-fusion
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Evaluate Pyserini run files, convert run formats, fuse retrieval runs, and use reproducibility matrices safely.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/reproducibility.md5.1 KB
- 参考文档references/run-evaluation.md5.7 KB
- 参考文档references/troubleshooting.md5.1 KB
- 脚本scripts/fusion_recipe_builder.py3.7 KB
- 脚本scripts/validate_trec_run.py8.1 KB
03 SKILL.md 正文
Evaluation And Fusion
Use this sub-skill when the task involves trec_eval, qrels, TREC/MS MARCO/KILT/DPR/QA retrieval evaluation, run-file validation, run conversion, reciprocal-rank fusion, interpolation, score normalization, or Pyserini two-click reproducibility matrices.
Do not use this sub-skill to generate search runs from an index. Route Lucene indexing/search/fetch workflows to ../index-search-fetch/SKILL.md, dense encoding/Faiss/hybrid retrieval generation to ../dense-encoding/SKILL.md, and Java/eval-jar/source-checkout build failures to ../install-and-runtime/SKILL.md or ../repo-development/SKILL.md.
Quick Routing
- TREC evaluation: Validate a six-column TREC run and qrels, then run
python -m pyserini.eval.trec_evalwith explicit metrics. - MS MARCO evaluation: Keep three-column MS MARCO runs for
msmarco_passage_eval/msmarco_doc_eval, or convert to six-column TREC beforetrec_eval. - KILT, DPR, and QA retrieval: Use the dedicated JSON/JSONL evaluators only after checking the expected schema and avoiding implicit annotation downloads.
- Run filtering: Use
pyserini.trectools.TrecRunandQrelsto inspect topics, retain or discard judged documents, normalize scores, or write a clean TREC run. - Fusion: Use
python -m pyserini.fusionforrrf,interpolation,average, andnormalizeon valid TREC runs with compatible query/document identifiers. - Reproducibility matrices: Prefer
--display-commands --dry-runfirst; treat full two-click commands as opt-in because they may download indexes, models, topics, qrels, or runs.
Default Safe Workflow
-
Validate the candidate run before evaluation or fusion:
python scripts/validate_trec_run.py run.trec --qrels qrels.txt --strict-ranks --summary -
If the run is MS MARCO format, convert it before using
trec_eval:python -m pyserini.eval.convert_msmarco_run_to_trec_run --input run.msmarco.tsv --output run.trec -
Evaluate with explicit metrics and a qrels key or qrels path:
python -m pyserini.eval.trec_eval -c -m ndcg_cut.10 -m recall.100 qrels.txt run.trec -
Build a fusion command without executing it:
python scripts/fusion_recipe_builder.py --method rrf --runs bm25.trec dense.trec --output fused.trec --runtag demo --k 100 --depth 1000 -
Validate the fused run and evaluate it with the same qrels and metrics as the input runs.
References
references/run-evaluation.mdcovers TREC, MS MARCO, KILT, DPR, QA,TrecRun,Qrels, qrels aliases, and common metrics.references/reproducibility.mdexplains two-click reproduction modules, dry-run/display-command safety, nondeterminism, and matrix triage.references/troubleshooting.mdmaps malformed runs, run/qrels mismatches, missing eval jars, unjudged documents, and expensive reproduction failures to fixes.scripts/validate_trec_run.py --helpvalidates TREC runs and qrels without importing Pyserini or starting Java.scripts/fusion_recipe_builder.py --helpgenerates reproducible Pyserini fusion commands with method-specific checks.
Acceptance Checklist
- Confirm whether the run is six-column TREC or three-column MS MARCO before choosing an evaluator.
- Keep query IDs and document IDs as strings; do not coerce them to integers unless a specific evaluator requires it.
- Use the same qrels/topic split and metric definitions for baseline, candidate, and fused runs.
- Validate every input run before fusion and validate the fused output before evaluation.
- Treat prebuilt-index reproduction and neural retrieval commands as network/model/cache-sensitive unless the user has explicitly approved them.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).