Spaces:
Build error
Build error
Xingyao Wang commited on
Commit ·
7eb2653
1
Parent(s): bb237c5
fix fine-grained report; support visualization while running
Browse files90 unmodified lines91929394959697989910010123 unmodified lines12512612712812913013113213313413513613790 unmodified linesif 'git_patch' in d:d['git_patch'] = clean_git_patch(d['git_patch'])d['history'] = reformat_history(d['history'])if d['instance_id'] in instance_id_to_status:d['fine_grained_report'] = dict(instance_id_to_status[d['instance_id']])else:d['fine_grained_report'] = {}data.append(d)df = pd.DataFrame(data)return df23 unmodified lines# resolved: if the test is successful and the agent has generated a non-empty patchif 'fine_grained_report' in entry:test_result['resolved'] = entry['fine_grained_report'].get('resolved', False)test_result['test_timeout'] = entry['fine_grained_report'].get('test_timeout', False)test_result['test_errored'] = entry['fine_grained_report'].get('test_errored', False)test_result['patch_applied'] = entry['fine_grained_report'].get('applied', False)else:# raise ValueError('No fine-grained report found.')test_result['resolved'] = False# avg,std obs lengthobs_lengths = []90 unmodified lines919293949596979823 unmodified lines12212312412512612712812913013113213313413590 unmodified linesif 'git_patch' in d:d['git_patch'] = clean_git_patch(d['git_patch'])d['history'] = reformat_history(d['history'])if d['instance_id'] in instance_id_to_status:d['fine_grained_report'] = dict(instance_id_to_status[d['instance_id']])data.append(d)df = pd.DataFrame(data)return df23 unmodified lines# resolved: if the test is successful and the agent has generated a non-empty patchif 'fine_grained_report' in entry:if not isinstance(entry['fine_grained_report'], dict):entry['fine_grained_report'] = {}test_result['resolved'] = entry['fine_grained_report'].get('resolved', False)test_result['test_timeout'] = entry['fine_grained_report'].get('test_timeout', False)test_result['test_errored'] = entry['fine_grained_report'].get('test_errored', False)test_result['patch_applied'] = entry['fine_grained_report'].get('applied', False)else:pass# avg,std obs lengthobs_lengths = []
utils/swe_bench.py+3-5