mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
fix: Retry tests on parse or timeout, add gpt-4o params
This commit is contained in:
parent
a915c60999
commit
c36c06ab99
2 changed files with 12 additions and 5 deletions
|
@ -771,7 +771,9 @@ MODEL_SETTINGS = [
|
|||
editor_model_name="openrouter/openai/gpt-4o",
|
||||
editor_edit_format="editor-diff",
|
||||
use_repo_map=True,
|
||||
streaming=False,
|
||||
use_temperature=False,
|
||||
extra_params=dict(reasoning_effort="high"),
|
||||
),
|
||||
ModelSettings(
|
||||
"openrouter/qwen/qwen-2.5-coder-32b-instruct",
|
||||
|
|
|
@ -644,10 +644,12 @@ def run_test_real(
|
|||
if results_fname.exists():
|
||||
try:
|
||||
res = json.loads(results_fname.read_text())
|
||||
return res
|
||||
if res.get("test_timeouts", 0) > 0:
|
||||
print(f"{results_fname} test timeouts, redoing...")
|
||||
else:
|
||||
return res
|
||||
except JSONDecodeError:
|
||||
print(f"{results_fname} failed to parse, skipping")
|
||||
return
|
||||
print(f"{results_fname} failed to parse, redoing...")
|
||||
|
||||
# Read solution and test files from config
|
||||
fnames = []
|
||||
|
@ -800,8 +802,11 @@ def run_test_real(
|
|||
try:
|
||||
errors = run_unit_tests(original_dname, testdir, history_fname, test_files)
|
||||
except subprocess.TimeoutExpired:
|
||||
errors = "Tests timed out!"
|
||||
timeouts += 1
|
||||
try:
|
||||
errors = run_unit_tests(original_dname, testdir, history_fname, test_files)
|
||||
except subprocess.TimeoutExpired:
|
||||
errors = "Tests timed out!"
|
||||
timeouts += 1
|
||||
|
||||
if errors:
|
||||
test_outcomes.append(False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue