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(batch instances): Making shuffle deterministic
Kilian Lieret5abe8223d729
diff --git a/sweagent/run/batch_instances.py b/sweagent/run/batch_instances.pyindex 09d42b6c..33ffaa9a 100644--- a/sweagent/run/batch_instances.py+++ b/sweagent/run/batch_instances.py@@ -61,7 +61,7 @@ def _filter_batch_items(instances: list[BatchInstance], *, filter_: str, slice_: str = "", shuffle: bool = False) -> list[BatchInstance]:if shuffle:- instances = sorted(instances.copy(), key=lambda x: random.random())+ instances = sorted(instances.copy(), key=lambda x: x.problem_statement.id)random.seed(42)random.shuffle(instances)before_filter = len(instances)