Skip to content

Commit

Permalink
Remove unused grading functions
Browse files Browse the repository at this point in the history
  • Loading branch information
john-b-yang committed Jul 15, 2024
1 parent 74567e9 commit 55a5dd3
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions swebench/harness/grading.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@


# MARK: Utility functions
def get_file_name_from_lp(x: str) -> str:
return x.rsplit("/", 1)[-1]


def get_id_from_lp(x: str) -> str:
return get_file_name_from_lp(x).split(".")[0]


def get_repo_from_lp(x: str) -> str:
return get_id_from_lp(x).rsplit("-", 1)[0].replace("__", "/")


def test_passed(case: str, sm: dict[str, str]) -> bool:
return case in sm and sm[case] == TestStatus.PASSED.value

Expand All @@ -41,6 +29,7 @@ def test_failed(case: str, sm: dict[str, str]) -> bool:
)


# MARK: Evaluation report functions
def get_logs_eval(log_fp: str) -> tuple[dict[str, str], bool]:
"""
Retrieve evaluation results for a task instance from its corresponding log file
Expand Down

0 comments on commit 55a5dd3

Please sign in to comment.