in scripts/extract_task_data.py [0:0]
def main():
# Target instance ID from SWEBench Lite
target_instance = "%instance_id%"
instance_data = get_problem_statement(target_instance)
if instance_data:
display_problem_info(instance_data)
# Save problem statement to Markdown file
if instance_data['problem_statement']:
output_file = f"{target_instance}_issue.md"
with open(output_file, 'w', encoding='utf-8') as f:
f.write(instance_data["problem_statement"])
print(f"\nInstance problem statement saved to: {output_file}")
if instance_data['hints_text']:
output_file = f"{target_instance}_hints.md"
with open(output_file, 'w', encoding='utf-8') as f:
f.write(instance_data["hints_text"])
print(f"\nInstance problem statement saved to: {output_file}")
output_file = f"{target_instance}.json"
with open(output_file, 'w', encoding='utf-8') as f:
json.dump(instance_data, f, indent=2, ensure_ascii=False)
print(f"\nFull instance data saved to: {output_file}")