mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
[Evaluation] Improve patch apply in SWE-Bench (#2684)
* add newline after patch to fix patch apply * only add newline if not empty
This commit is contained in:
parent
7d31057904
commit
e8cb6803df
@ -17,7 +17,9 @@ model_name = os.path.basename(os.path.dirname(args.od_output_file))
|
||||
def convert_row_to_swebench_format(row):
|
||||
return {
|
||||
'instance_id': row['instance_id'],
|
||||
'model_patch': row['git_patch'].replace('\r\n', '\n'),
|
||||
'model_patch': row['git_patch'].replace('\r\n', '\n').rstrip() + '\n'
|
||||
if row['git_patch'].strip()
|
||||
else '',
|
||||
'model_name_or_path': model_name,
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user