mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 23:08:04 -05:00
[Evaluation] Fix KeyError when the instance failed prematurely (#7864)
This commit is contained in:
@@ -864,7 +864,7 @@ if __name__ == '__main__':
|
|||||||
# Also make sure git_patch is not empty - otherwise we fall back to previous attempt (empty patch is worse than anything else)
|
# Also make sure git_patch is not empty - otherwise we fall back to previous attempt (empty patch is worse than anything else)
|
||||||
if (
|
if (
|
||||||
instance['instance_id'] not in added_instance_ids
|
instance['instance_id'] not in added_instance_ids
|
||||||
and instance['test_result']['git_patch'].strip()
|
and instance['test_result'].get('git_patch', '').strip()
|
||||||
):
|
):
|
||||||
fout.write(line)
|
fout.write(line)
|
||||||
added_instance_ids.add(instance['instance_id'])
|
added_instance_ids.add(instance['instance_id'])
|
||||||
|
|||||||
Reference in New Issue
Block a user