SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Fix: Unexpected keyword 'split' in load_dataset (#76)
Kilian Lieret29c05c952d2c
diff --git a/sweagent/environment/utils.py b/sweagent/environment/utils.pyindex 9085cc41..daa29b20 100644--- a/sweagent/environment/utils.py+++ b/sweagent/environment/utils.py@@ -324,7 +324,10 @@ def get_instances(file_path: str, base_commit: str = None, split: str = None, to"""# If file_path is a directory, attempt load from diskif os.path.isdir(file_path):- return load_from_disk(file_path, split=split)+ dataset_or_dict = load_from_disk(file_path)+ if isinstance(dataset_or_dict, dict):+ return dataset_or_dict[split]+ return dataset_or_dict# If file_path is a github issue url, fetch the issue and return a single instanceif is_from_github_url(file_path):