Skip to content

Fix KeyError crash when non-eval JSON files exist in results/ - #170

Merged
lukeinglis merged 1 commit into
mainfrom
fix/eval-keyerror-non-result-files
Aug 21, 2026
Merged

Fix KeyError crash when non-eval JSON files exist in results/#170
lukeinglis merged 1 commit into
mainfrom
fix/eval-keyerror-non-result-files

Conversation

@lukeinglis

Copy link
Copy Markdown
Owner

Closes #169

Changes

  • Guard the difficulty-adjustment loop in eval.py against result files that lack model_slug or forecasts keys (e.g. parity investigation outputs saved to results/)
  • Uses .get() with a continue guard instead of direct key access to skip non-eval JSON files gracefully

load_previous_results() loads all .json files from results/, but some
(like parity investigation outputs) lack 'model_slug' and 'forecasts'
keys, causing a KeyError. Use .get() with a guard to skip these files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lukeinglis
lukeinglis merged commit 99ee0dc into main Aug 21, 2026
5 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.

1 participant