Skip to content

Commit 4388681

Browse files
committed
update aider
1 parent 953f4b6 commit 4388681

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

baselines/config/aider.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ defaults:
55

66
aider_config:
77
use_repo_info: false
8-
use_unit_tests_info: false
8+
use_unit_tests_info: true
99
use_reference_info: false
10-
use_lint_info: true
10+
use_lint_info: false

baselines/run_aider.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ def run_aider_for_repo(
6767
aider_config, target_edit_files_cmd_args, repo_path, ds
6868
)
6969

70+
test_files = test_files[:1]
7071
for test_file in test_files:
71-
test_cmd = f"python -m commit0.harness.run_pytest_ids --repo {repo_name} --test_ids {test_file} --branch_name aider"
72+
test_cmd = f"uv run commit0 test-reference {repo_name} {test_file}"
7273

7374
aider_cmd = get_aider_cmd(
7475
aider_config.llm_name,
@@ -77,8 +78,14 @@ def run_aider_for_repo(
7778
test_cmd,
7879
)
7980

81+
print(aider_cmd)
82+
8083
try:
81-
_ = subprocess.call(aider_cmd, shell=True)
84+
process = subprocess.Popen(aider_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
85+
stdout, stderr = process.communicate()
86+
results = process.returncode
87+
logger.info(f"STDOUT: {stdout}")
88+
logger.info(f"STDERR: {stderr}")
8289
except subprocess.CalledProcessError as e:
8390
logger.error(f"Command failed with exit code {e.returncode}")
8491
logger.error(f"STDOUT: {e.stdout}")
@@ -107,6 +114,7 @@ def main(config: BaselineConfig) -> None:
107114

108115
dataset = load_dataset(commit0_config.dataset_name, split="test")
109116

117+
dataset = [dataset[3]]
110118
thread_map(
111119
partial(run_aider_for_repo, commit0_config, aider_config),
112120
dataset,

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ dependencies = [
2525
"pre-commit>=3.8.0",
2626
"hydra-core>=1.3.2",
2727
"modal>=0.64.95",
28+
"aider-chat"
2829
]
2930
scripts = { commit0 = "commit0.__main__:main" }
3031

0 commit comments

Comments
 (0)