mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
feat: add sleep option between tests in single-threaded mode
This commit is contained in:
parent
02e7e315b2
commit
a9401e921e
1 changed files with 5 additions and 0 deletions
|
@ -158,6 +158,7 @@ def main(
|
||||||
dirnames: Optional[List[str]] = typer.Argument(None, help="Directory names"),
|
dirnames: Optional[List[str]] = typer.Argument(None, help="Directory names"),
|
||||||
graphs: bool = typer.Option(False, "--graphs", help="Generate graphs"),
|
graphs: bool = typer.Option(False, "--graphs", help="Generate graphs"),
|
||||||
model: str = typer.Option("gpt-3.5-turbo", "--model", "-m", help="Model name"),
|
model: str = typer.Option("gpt-3.5-turbo", "--model", "-m", help="Model name"),
|
||||||
|
sleep: float = typer.Option(0, "--sleep", help="Sleep seconds between tests when single threaded"),
|
||||||
edit_format: str = typer.Option(None, "--edit-format", "-e", help="Edit format"),
|
edit_format: str = typer.Option(None, "--edit-format", "-e", help="Edit format"),
|
||||||
editor_model: str = typer.Option(None, "--editor-model", help="Editor model name"),
|
editor_model: str = typer.Option(None, "--editor-model", help="Editor model name"),
|
||||||
editor_edit_format: str = typer.Option(None, "--editor-edit-format", help="Editor edit format"),
|
editor_edit_format: str = typer.Option(None, "--editor-edit-format", help="Editor edit format"),
|
||||||
|
@ -285,10 +286,13 @@ def main(
|
||||||
editor_model,
|
editor_model,
|
||||||
editor_edit_format,
|
editor_edit_format,
|
||||||
num_ctx,
|
num_ctx,
|
||||||
|
sleep,
|
||||||
)
|
)
|
||||||
|
|
||||||
all_results.append(results)
|
all_results.append(results)
|
||||||
summarize_results(dirname)
|
summarize_results(dirname)
|
||||||
|
if sleep:
|
||||||
|
time.sleep(sleep)
|
||||||
else:
|
else:
|
||||||
run_test_threaded = lox.thread(threads)(run_test)
|
run_test_threaded = lox.thread(threads)(run_test)
|
||||||
for testname in test_dnames:
|
for testname in test_dnames:
|
||||||
|
@ -565,6 +569,7 @@ def run_test_real(
|
||||||
editor_model,
|
editor_model,
|
||||||
editor_edit_format,
|
editor_edit_format,
|
||||||
num_ctx=None,
|
num_ctx=None,
|
||||||
|
sleep=0,
|
||||||
):
|
):
|
||||||
if not os.path.isdir(testdir):
|
if not os.path.isdir(testdir):
|
||||||
print("Not a dir:", testdir)
|
print("Not a dir:", testdir)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue