Skip to content

Commit 9f7b3b2

Browse files
committed
added splits for swebench
1 parent 3cab133 commit 9f7b3b2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

commit0/harness/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def main(
3030
for example in dataset:
3131
repo_name = example["repo"].split("/")[-1]
3232
if "swe" in dataset_name.lower():
33-
if repo_split != "all" and example["instance_id"] != repo_split:
33+
if repo_split != "all" and repo_split not in example["instance_id"]:
3434
continue
3535
else:
3636
if repo_split != "all" and repo_name not in SPLIT[repo_split]:

commit0/harness/evaluate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ def main(
3636
if repo_split == "all":
3737
repos = dataset["instance_id"] # type: ignore
3838
else:
39-
repos = [repo_split]
39+
repos = [one for one in dataset["instance_id"] if repo_split in one] # type: ignore
4040
else:
4141
repos = SPLIT[repo_split]
4242
triples = []
4343
log_dirs = []
4444
for example in dataset:
4545
repo_name = example["repo"].split("/")[-1]
4646
if "swe" in dataset_name.lower():
47-
if repo_split != "all" and example["instance_id"] != repo_split:
47+
if repo_split != "all" and repo_split not in example["instance_id"]:
4848
continue
4949
else:
5050
if repo_split != "all" and repo_name not in SPLIT[repo_split]:

commit0/harness/save.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def main(
3131
for example in dataset:
3232
repo_name = example["repo"].split("/")[-1]
3333
if "swe" in dataset_name.lower():
34-
if repo_split != "all" and example["instance_id"] != repo_split:
34+
if repo_split != "all" and repo_split not in example["instance_id"]:
3535
continue
3636
else:
3737
if repo_split != "all" and repo_name not in SPLIT[repo_split]:

commit0/harness/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def main(
2727
repo_name = example["repo"].split("/")[-1]
2828
clone_url = f"https://github.com/{example['repo']}.git"
2929
if "swe" in dataset_name.lower():
30-
if repo_split != "all" and example["instance_id"] != repo_split:
30+
if repo_split != "all" and repo_split not in example["instance_id"]:
3131
continue
3232
clone_dir = os.path.abspath(os.path.join(base_dir, example["instance_id"]))
3333
branch = example["base_commit"]

0 commit comments

Comments
 (0)