Skip to content

fix(gpqa): write evaluator output to results.json#31

Merged
yogendrahexo merged 2 commits into
hexo-ai:mainfrom
skyzer:fix/gpqa-results-json-contract
Jun 19, 2026
Merged

fix(gpqa): write evaluator output to results.json#31
yogendrahexo merged 2 commits into
hexo-ai:mainfrom
skyzer:fix/gpqa-results-json-contract

Conversation

@skyzer

@skyzer skyzer commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make the bundled GPQA evaluator write results.json by default
  • keep explicit --output overrides unchanged
  • add a regression test for the SIA evaluator artifact contract

Why

run_evaluation() treats gen_*/results.json as the canonical evaluator artifact. GPQA previously wrote evaluation_results.json by default, so evaluation could complete but the orchestrator would still report that results.json was missing.

Test plan

  • python3 -m pytest tests/test_gpqa_evaluator.py -q
  • python3 -m pytest tests/test_gpqa_evaluator.py tests/test_run_evaluation.py tests/test_run_evaluation_outcomes.py -q
  • python3 -m ruff check .
  • python3 -m pytest -q

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 364f9400af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

output_path = args.output
elif args.gen_dir:
output_path = args.gen_dir / "evaluation_results.json"
output_path = args.gen_dir / "results.json"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid reusing evaluator output as submission

When --gen-dir is used, find_submission_file() runs before this write and treats any root-level results*.json as the submission candidate, returning it before checking submission*.json. After the first successful evaluation creates gen_dir/results.json, any rerun on the same generation directory will load the previous evaluator output as the model submission, so answers are absent/misread and the new results can overwrite a correct score with incorrect/missing results. Please exclude the evaluator artifact from submission discovery or otherwise disambiguate it before making it the default output name.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @skyzer, Could you also please address these two together:

  1. Drop results*.json from the patterns list used in find_submission_file() - since we explicitly ask agents to produce submission.json, there's no need to match on that prefix.
  2. Remove the "any JSON file" fallback entirely (lines 93–99), If no explicit pattern matched, guessing will cause the same bug again. Better to fail clearly with a FileNotFoundError.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 06908e6: removed root-level results*.json discovery, removed the arbitrary *.json fallback, and added regression tests for both cases. Local pytest/ruff/full test suite passed.

@selvamHexo
selvamHexo requested a review from yogendrahexo June 8, 2026 15:37
@yogendrahexo
yogendrahexo force-pushed the fix/gpqa-results-json-contract branch from 364f940 to cd122f9 Compare June 17, 2026 18:27
@skyzer

skyzer commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Addressed both requested changes in 06908e6:

  • removed root-level results*.json from find_submission_file() discovery patterns
  • removed the arbitrary *.json fallback so missing explicit submission artifacts fail clearly instead of guessing
  • added regression tests for ignoring gen_dir/results.json and not guessing arbitrary JSON files

Local checks passed:

  • python3 -m pytest tests/test_gpqa_evaluator.py tests/test_run_evaluation.py tests/test_run_evaluation_outcomes.py -q
  • python3 -m ruff check .
  • python3 -m pytest -q

@yogendrahexo
yogendrahexo self-requested a review June 19, 2026 08:17

@yogendrahexo yogendrahexo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fix!

@yogendrahexo
yogendrahexo merged commit b141ced into hexo-ai:main Jun 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants