Skip to content

Commit e02e743

Browse files
committed
pre-commit
1 parent f0e9e93 commit e02e743

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

baselines/run_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def run_agent_for_repo(
5252
repo_name = repo_name.replace(".", "-")
5353

5454
# Call the commit0 get-tests command to retrieve test files
55-
test_files_str = get_tests(repo_name, stdout=False)
55+
test_files_str = get_tests(repo_name, verbose=0)
5656
test_files = sorted(list(set([i.split(":")[0] for i in test_files_str])))
5757

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

commit0/cli.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ def build(
7777
),
7878
dataset_split: str = typer.Option("test", help="Split of the Huggingface dataset"),
7979
num_workers: int = typer.Option(8, help="Number of workers"),
80-
verbose: int = typer.Option(1, "--verbose", "-v", help="Set this to 2 for more logging information", count=True),
80+
verbose: int = typer.Option(
81+
1,
82+
"--verbose",
83+
"-v",
84+
help="Set this to 2 for more logging information",
85+
count=True,
86+
),
8187
) -> None:
8288
"""Commit0 build a repository."""
8389
check_valid(repo_split, SPLIT)
@@ -134,7 +140,13 @@ def test(
134140
reference: Annotated[
135141
bool, typer.Option("--reference", help="Test the reference commit.")
136142
] = False,
137-
verbose: int = typer.Option(1, "--verbose", "-v", help="Set this to 2 for more logging information", count=True),
143+
verbose: int = typer.Option(
144+
1,
145+
"--verbose",
146+
"-v",
147+
help="Set this to 2 for more logging information",
148+
count=True,
149+
),
138150
) -> None:
139151
"""Run tests on a Commit0 repository."""
140152
if repo_or_repo_path.endswith("/"):

commit0/harness/docker_build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def build_repo_images(
205205
client (docker.DockerClient): Docker client to use for building the images
206206
dataset (list): List of test specs or dataset to build images for
207207
max_workers (int): Maximum number of workers to use for building images
208+
verbose (int): Level of verbosity
208209
209210
Return:
210211
------

commit0/harness/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ def __str__(self):
2727
)
2828

2929

30-
def setup_logger(repo: str, log_file: Path, mode: str = "w", verbose: int = 1) -> logging.Logger:
30+
def setup_logger(
31+
repo: str, log_file: Path, mode: str = "w", verbose: int = 1
32+
) -> logging.Logger:
3133
"""Used for logging the build process of images and running containers.
3234
It writes logs to the log file.
3335
"""

0 commit comments

Comments
 (0)