Skip to content

Commit 4fc2db7

Browse files
committed
fix baselines
1 parent 88d8526 commit 4fc2db7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

baselines/run_aider.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ def run_aider_for_repo(
9595

9696
repo_path = os.path.join(commit0_config.base_dir, repo_name)
9797

98-
os.chdir(repo_path)
99-
10098
target_edit_files_cmd_args = get_target_edit_files_cmd_args(repo_path)
10199

100+
os.chdir(repo_path)
101+
102102
message_to_aider = get_message_to_aider(
103103
aider_config, target_edit_files_cmd_args, repo_path, ds
104104
)
@@ -109,15 +109,15 @@ def run_aider_for_repo(
109109
lint_cmd = ""
110110

111111
print(
112-
f"Aider logs for {repo_name} can be found in: {RUN_AIDER_LOG_DIR / repo_name / 'ai'}"
112+
f"Aider logs for {repo_name} can be found in: {Path.cwd() /RUN_AIDER_LOG_DIR}"
113113
)
114114

115115
if aider_config.run_tests:
116116
for test_file in test_files:
117117
test_cmd = f"python -m commit0 test {repo_name} {test_file}"
118118
# set up logging
119119
test_file_name = test_file.replace(".py", "").replace("/", "__")
120-
log_dir = RUN_AIDER_LOG_DIR / repo_name / "ai" / test_file_name
120+
log_dir = RUN_AIDER_LOG_DIR / test_file_name
121121
log_dir.mkdir(parents=True, exist_ok=True)
122122
log_file = log_dir / "run_aider.log"
123123
logger = setup_logger(repo_name, log_file)
@@ -140,10 +140,9 @@ def run_aider_for_repo(
140140
test_cmd_file.write_text(test_cmd)
141141

142142
execute_aider_cmd(aider_cmd, logger)
143-
144143
else:
145144
# set up logging
146-
log_dir = RUN_AIDER_LOG_DIR / repo_name / "ai" / "no_test"
145+
log_dir = RUN_AIDER_LOG_DIR / "no_test"
147146
log_dir.mkdir(parents=True, exist_ok=True)
148147
log_file = log_dir / "run_aider.log"
149148
logger = setup_logger(repo_name, log_file)

0 commit comments

Comments
 (0)