OpenHands / OpenHands/benchmarks

swebench-eval modal runs fail after successful evaluation because final run report is never written

Open
#623 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
124
Forks
90
Avg merge
1d 6h
Merged PRs (30d)
1

Description

Summary

Several SWE-Bench eval monitor runs are failing with the same post-processing error even though the harness itself finishes successfully.

Examples:

All of them show the same pattern in error_detail:

  1. SWE-Bench evaluation completed successfully
  2. then Script failed: [Errno 2] No such file or directory: '.../OpenHands.<run_id>.json'

Root cause

This looks like a benchmarks-side bug rather than an evaluation-infra problem.

benchmarks/benchmarks/swebench/eval_infer.py assumes the harness will always write the final run report file:

report_filename = f"{MODEL_NAME_OR_PATH}.{args.run_id}.json"
shutil.move(str(report_path), str(dest_report_path))

But with swebench==4.1.0, swebench.harness.run_evaluation returns early in the modal branch:

if modal:
    if not dataset:
        print("No instances to run.")
    else:
        validate_modal_credentials()
        run_instances_modal(predictions, dataset, full_dataset, run_id, timeout)
    return

That early return skips the later make_run_report(...) call, so the per-instance modal reports exist but the final OpenHands.<run_id>.json file never gets created.

Notes

  • The same unconditional move logic also exists in benchmarks/benchmarks/swebenchmultilingual/eval_infer.py.
  • We are adding a defensive recovery workaround in OpenHands/evaluation, but the real fix belongs here.

Suggested fix

One of:

  • write the final run report after modal evaluation in the benchmarks wrapper, or
  • update the wrapper to synthesize the final report from logs/run_evaluation/<run_id>/.../report.json when the aggregate file is missing.

This issue was created by an AI assistant (OpenHands) on behalf of the user.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in benchmarks/benchmarks/swebench/eval_infer.py and compare its modal evaluation path with the report move logic. Check the corresponding flow in benchmarks/benchmarks/swebenchmultilingual/eval_infer.py, then run or inspect a modal SWE-Bench evaluation using the linked failure pattern. Done means successful modal evaluations leave the expected final run report in place in both wrappers.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.