Skip to content

Commit b65f265

Browse files
committed
pre-commit
1 parent 1e3cc2d commit b65f265

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

baselines/run_agent.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import os
22
import sys
33
import hydra
4-
import traceback
54
import multiprocessing
65
from datasets import load_dataset
76
from git import Repo
@@ -20,7 +19,6 @@
2019
from commit0.harness.get_pytest_ids import main as get_tests
2120
from commit0.harness.constants import RUN_AIDER_LOG_DIR, RepoInstance
2221
from tqdm import tqdm
23-
from concurrent.futures import ThreadPoolExecutor, as_completed
2422

2523

2624
class DirContext:
@@ -151,7 +149,9 @@ def main() -> None:
151149
if len(filtered_dataset) > 1:
152150
sys.stdout = open(os.devnull, "w")
153151

154-
with tqdm(total=len(filtered_dataset), smoothing=0, desc="Running Aider for repos") as pbar:
152+
with tqdm(
153+
total=len(filtered_dataset), smoothing=0, desc="Running Aider for repos"
154+
) as pbar:
155155
with multiprocessing.Pool(processes=commit0_config.num_workers) as pool:
156156
results = []
157157

@@ -160,7 +160,9 @@ def main() -> None:
160160
result = pool.apply_async(
161161
run_agent_for_repo,
162162
args=(commit0_config, agent_config, example),
163-
callback=lambda _: pbar.update(1) # Update progress bar on task completion
163+
callback=lambda _: pbar.update(
164+
1
165+
), # Update progress bar on task completion
164166
)
165167
results.append(result)
166168

0 commit comments

Comments
 (0)