MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / eval

Function eval

paperflow/cli.py:418–453  ·  view source on GitHub ↗

Run the public PaperFlow-Bench evaluator on a predictions file.

(
    benchmark_dir: Path = typer.Option(
        Path("data/PaperFlow-Bench"),
        "--benchmark-dir",
        "-b",
        help="Benchmark root containing data/, reference_outputs/, evaluation/.",
    ),
    predictions: Path = typer.Option(
        ...,
        "--predictions",
        "-p",
        help="Top-20 predictions JSONL file (one row per episode).",
    ),
    output: Path = typer.Option(
        Path("paperflow_eval.json"),
        "--output",
        "-o",
        help="Where to write the metrics JSON.",
    ),
)

Source from the content-addressed store, hash-verified

416
417@app.command()
418def eval(
419 benchmark_dir: Path = typer.Option(
420 Path("data/PaperFlow-Bench"),
421 "--benchmark-dir",
422 "-b",
423 help="Benchmark root containing data/, reference_outputs/, evaluation/.",
424 ),
425 predictions: Path = typer.Option(
426 ...,
427 "--predictions",
428 "-p",
429 help="Top-20 predictions JSONL file (one row per episode).",
430 ),
431 output: Path = typer.Option(
432 Path("paperflow_eval.json"),
433 "--output",
434 "-o",
435 help="Where to write the metrics JSON.",
436 ),
437) -> None:
438 """Run the public PaperFlow-Bench evaluator on a predictions file."""
439 script = PROJECT_ROOT / "experiments" / "benchmark" / "evaluate_benchmark_predictions.py"
440 if not script.exists():
441 typer.echo(f"[error] evaluator not found: {script}", err=True)
442 raise typer.Exit(code=1)
443 raise typer.Exit(
444 code=_run_python(
445 script,
446 "--benchmark-dir",
447 str(benchmark_dir),
448 "--predictions",
449 str(predictions),
450 "--output",
451 str(output),
452 )
453 )
454
455
456def main() -> None: # pragma: no cover - thin wrapper

Callers

nothing calls this directly

Calls 1

_run_pythonFunction · 0.85

Tested by

no test coverage detected