Skip to content

Fix KeyError in verbose mode when common workload has unparseable JSON#136

Draft
Copilot wants to merge 2 commits intoprosenj_cli_hq_eval_report_phase_2from
copilot/sub-pr-99-yet-again
Draft

Fix KeyError in verbose mode when common workload has unparseable JSON#136
Copilot wants to merge 2 commits intoprosenj_cli_hq_eval_report_phase_2from
copilot/sub-pr-99-yet-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

common is derived from file presence via find_common_workloads(), but baseline_data/test_data from load_comparison_data() silently drop files that fail to parse. Iterating over common in verbose mode could therefore hit a KeyError for any workload whose JSON exists on disk but is invalid.

Changes

  • hwqueue_pipeline.py: Replace for wl_name in common with for wl_name in baseline_data.keys() & test_data.keys() in the verbose summary loop, restricting iteration to workloads successfully loaded in both datasets.
# Before — KeyError if any file in `common` failed to parse
for wl_name in common:
    b = baseline_data[wl_name]
    t = test_data[wl_name]

# After — safe: only workloads present in both loaded dicts
for wl_name in baseline_data.keys() & test_data.keys():
    b = baseline_data[wl_name]
    t = test_data[wl_name]

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…ata keys intersection

Co-authored-by: prosenjitdhole <239307697+prosenjitdhole@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on AORTA-23 for CLI updates Fix KeyError in verbose mode when common workload has unparseable JSON Mar 6, 2026
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