Skip to content

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]

Enh: Fix seed for shuffling

Kilian Lieretca88897d905f
diff --git a/sweagent/run/batch_instances.py b/sweagent/run/batch_instances.py
index 6a3505d7..9029f292 100644
--- a/sweagent/run/batch_instances.py
+++ b/sweagent/run/batch_instances.py
@@ -80,6 +80,7 @@ def _filter_batch_items(
) -> list[BatchInstance]:
if shuffle:
instances = instances.copy()
+ random.seed(42)
random.shuffle(instances)
before_filter = len(instances)
instances = [instance for instance in instances if re.match(filter_, instance.problem_statement.id)]