Skip to content

Commit a3f8311

Browse files
committed
setup integration
1 parent 152a327 commit a3f8311

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

commit0/harness/setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ def main(
2828
if repo_split != "all" and repo_name not in SPLIT[repo_split]:
2929
continue
3030
clone_url = f"https://github.com/{example['repo']}.git"
31-
clone_dir = os.path.abspath(os.path.join(base_dir, repo_name))
32-
branch = dataset_name.split("/")[-1]
31+
if "swe" in dataset_name.lower():
32+
clone_dir = os.path.abspath(os.path.join(base_dir, example["instance_id"]))
33+
branch = example["base_commit"]
34+
else:
35+
clone_dir = os.path.abspath(os.path.join(base_dir, repo_name))
36+
branch = dataset_name.split("/")[-1]
3337
repo = clone_repo(clone_url, clone_dir, branch, logger)
3438
if BASE_BRANCH in repo.branches:
3539
repo.git.branch("-d", BASE_BRANCH)

0 commit comments

Comments
 (0)