Skip to content

[Draft] Integration with other datasets #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a3f8311
setup integration
wenting-zhao Oct 28, 2024
29ba219
other integration
wenting-zhao Oct 28, 2024
958155a
pre-commit fixes
wenting-zhao Oct 28, 2024
245c4ec
fixes type errors
wenting-zhao Oct 28, 2024
2ee3378
more integration work
wenting-zhao Oct 28, 2024
c307a90
fix format
wenting-zhao Oct 28, 2024
b2d71ee
regression fix
wenting-zhao Oct 29, 2024
0c53c11
went through more examples
wenting-zhao Oct 29, 2024
30556e0
precommit fixes
wenting-zhao Oct 29, 2024
83a3869
getting through all repos
wenting-zhao Oct 30, 2024
4c00ab4
refactor spec.py
wenting-zhao Oct 30, 2024
11c1ff1
pre-commit fixes
wenting-zhao Oct 30, 2024
c52225b
Merge branch 'main' into integration
wenting-zhao Oct 30, 2024
98680f1
fixes
wenting-zhao Oct 30, 2024
66b230c
fixes
wenting-zhao Oct 30, 2024
b1e6629
updated evaluate
wenting-zhao Nov 1, 2024
3d3062a
added test ids
wenting-zhao Nov 1, 2024
598cb8f
fixes
wenting-zhao Nov 1, 2024
219bc06
fixes
wenting-zhao Nov 1, 2024
416370f
explicit consideration of test patches
wenting-zhao Nov 2, 2024
a82c09b
updates
wenting-zhao Nov 3, 2024
3cab133
log extra info
wenting-zhao Nov 3, 2024
9f7b3b2
added splits for swebench
wenting-zhao Nov 4, 2024
08b0524
Fixed pytest issues
wenting-zhao Nov 11, 2024
3f0b56f
Merge branch 'main' into integration
wenting-zhao Nov 30, 2024
f6ea9ed
fixed pre-commit error
wenting-zhao Nov 30, 2024
38205e6
added humaneval
wenting-zhao Dec 2, 2024
4a33937
fix type errors
wenting-zhao Dec 2, 2024
e87ab9a
fixed all type errors
wenting-zhao Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion agent/run_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def run_agent_for_repo(
local_repo, "HEAD", example["base_commit"]
)
# Call the commit0 get-tests command to retrieve test files
test_files_str = get_tests(repo_name, verbose=0)
test_files_str = [xx for x in get_tests(repo_name, verbose=0) for xx in x]
test_files = sorted(list(set([i.split(":")[0] for i in test_files_str])))

# prepare the log dir
Expand Down
2 changes: 1 addition & 1 deletion agent/run_agent_no_rich.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def run_agent_for_repo(
local_repo, "HEAD", example["base_commit"]
)
# Call the commit0 get-tests command to retrieve test files
test_files_str = get_tests(repo_name, verbose=0)
test_files_str = [xx for x in get_tests(repo_name, verbose=0) for xx in x]
test_files = sorted(list(set([i.split(":")[0] for i in test_files_str])))

# prepare the log dir
Expand Down
33 changes: 20 additions & 13 deletions commit0/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def setup(
) -> None:
"""Commit0 clone a repo split."""
check_commit0_path()
check_valid(repo_split, SPLIT)
if "commit0" in dataset_name.split("/")[-1].lower():
check_valid(repo_split, SPLIT)

base_dir = str(Path(base_dir).resolve())

Expand Down Expand Up @@ -168,7 +169,8 @@ def build(
check_commit0_path()

commit0_config = read_commit0_config_file(commit0_config_file)
check_valid(commit0_config["repo_split"], SPLIT)
if "commit0" in commit0_config["dataset_name"].split("/")[-1].lower():
check_valid(commit0_config["repo_split"], SPLIT)

typer.echo(
f"Building repository for split: {highlight(commit0_config['repo_split'], Colors.ORANGE)}"
Expand Down Expand Up @@ -199,7 +201,6 @@ def get_tests(
) -> None:
"""Get tests for a Commit0 repository."""
check_commit0_path()
check_valid(repo_name, SPLIT_ALL)

commit0.harness.get_pytest_ids.main(repo_name, verbose=1)

Expand Down Expand Up @@ -247,19 +248,23 @@ def test(
) -> None:
"""Run tests on a Commit0 repository."""
check_commit0_path()
commit0_config = read_commit0_config_file(commit0_config_file)
if repo_or_repo_path.endswith("/"):
repo_or_repo_path = repo_or_repo_path[:-1]
check_valid(repo_or_repo_path.split("/")[-1], SPLIT_ALL)

commit0_config = read_commit0_config_file(commit0_config_file)
if "commit0" in commit0_config["dataset_name"].split("/")[-1].lower():
check_valid(repo_or_repo_path.split("/")[-1], SPLIT)

if reference:
branch = "reference"
if branch is None and not reference:
git_path = os.path.join(
commit0_config["base_dir"], repo_or_repo_path.split("/")[-1]
)
branch = get_active_branch(git_path)
else:
if "humaneval" not in commit0_config["dataset_name"].split("/")[-1].lower():
if branch is None and not reference:
git_path = os.path.join(
commit0_config["base_dir"], repo_or_repo_path.split("/")[-1]
)
branch = get_active_branch(git_path)
else:
branch = test_ids

if stdin:
# Read test names from stdin
Expand Down Expand Up @@ -316,7 +321,8 @@ def evaluate(
branch = "reference"

commit0_config = read_commit0_config_file(commit0_config_file)
check_valid(commit0_config["repo_split"], SPLIT)
if "commit0" in commit0_config["dataset_name"].split("/")[-1].lower():
check_valid(commit0_config["repo_split"], SPLIT)

typer.echo(f"Evaluating repository split: {commit0_config['repo_split']}")
typer.echo(f"Branch: {branch}")
Expand Down Expand Up @@ -391,7 +397,8 @@ def save(
"""Save Commit0 split you choose in Setup Stage to GitHub."""
check_commit0_path()
commit0_config = read_commit0_config_file(commit0_config_file)
check_valid(commit0_config["repo_split"], SPLIT)
if "commit0" in commit0_config["dataset_name"].split("/")[-1].lower():
check_valid(commit0_config["repo_split"], SPLIT)

typer.echo(f"Saving repository split: {commit0_config['repo_split']}")
typer.echo(f"Owner: {owner}")
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading