forked from swe-bench/SWE-bench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes swe-bench#148
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import collections | ||
import json | ||
import docker | ||
|
||
from swebench.harness.run_evaluation import make_run_report | ||
|
||
TEST_INSTANCE = collections.defaultdict(lambda: "test") | ||
TEST_INSTANCE["PASS_TO_PASS"] = '[]' | ||
TEST_INSTANCE["repo"] = 'pvlib/pvlib-python' | ||
TEST_INSTANCE["version"] = '0.1' | ||
TEST_INSTANCE["FAIL_TO_PASS"] = '[]' | ||
|
||
def test_make_run_report(tmpdir) -> None: | ||
client = docker.from_env() | ||
with tmpdir.as_cwd(): | ||
output_path = make_run_report( | ||
{"test": {"instance_id": "test", "model_name_or_path": "test"}}, | ||
[TEST_INSTANCE], | ||
client, | ||
"test" | ||
) | ||
assert output_path.is_file() | ||
report = json.loads(output_path.read_text()) | ||
assert report["schema_version"] == 2 |