mirror of
https://github.com/priyanshujain/messageboardbench.git
synced 2026-10-02 19:17:07 +00:00
Checkpoint experiments through SWE pilot v2
This commit is contained in:
1 parent
abacd5c5e1
commit
72d77018d8
845 files changed
+431756
-41
No files matched your search
@@ -0,0 +1,31 @@
|
||||
from pathlib import Path
|
||||
import runpy
|
||||
|
||||
import pytest
|
||||
|
||||
script = runpy.run_path(str(Path(__file__).parents[1] / "scripts" / "diagnostic.py"))
|
||||
|
||||
|
||||
def test_defaults_are_preview_and_two_samples():
|
||||
args = script["parser"]().parse_args(["--out", "logs/example"])
|
||||
config, seeds = script["configuration"](args)
|
||||
assert not args.execute
|
||||
assert len(config["ids"]) == 2
|
||||
assert config["concurrency"] == 2
|
||||
assert not seeds
|
||||
|
||||
|
||||
def test_large_diagnostic_batch_rejected():
|
||||
args = script["parser"]().parse_args(["--out", "logs/example", "--ids", *map(str, range(40))])
|
||||
with pytest.raises(ValueError, match="1–8"):
|
||||
script["configuration"](args)
|
||||
|
||||
|
||||
def test_seed_manifest_identifies_input(tmp_path):
|
||||
p = tmp_path / "reference.py"
|
||||
p.write_text("# actual donor content\n")
|
||||
args = script["parser"]().parse_args(["--out", "logs/example", "--seed-file", str(p)])
|
||||
config, seeds = script["configuration"](args)
|
||||
assert seeds[p.name] == p.read_text()
|
||||
assert config["seed_files"][p.name]["source"] == str(p.resolve())
|
||||
assert len(config["seed_files"][p.name]["sha256"]) == 64
|
||||
Reference in new issue
Block a user