INNER CODE UNIT · Python

grade_workspace

wgpsec/AboutSecurity · scripts/grade_eval.py:171

def grade_workspace(workspace: Path, evals_data: dict = None, model: str = None):
    """Grade all runs in a workspace directory."""
    run_dirs = sorted(workspace.rglob("run-*/"))

    if not run_dirs:
        print(f"No run directories found in {workspace}")
        return

    print(f"Grading {len(run_dirs)} runs in {workspace}")

    for run_dir in run_dirs:
        if not (run_dir / "output.txt").exists():
            continue

        rel = run_dir.relative_to(workspace)
        print(f"  ▸ {rel}...", end=" ", flush=True)

        grading = grade_run_dir(run_dir, evals_data, model=model)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…