mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-17 12:09:27 +00:00
bench(valid): a training freeze may cap the history walk at the newest N first-parent commits
ordinary_history(limit=) walks only the newest commits; assemble.freeze(history_limit=) and --history-limit pass it through and the record carries it. The held-out benchmark passes none. Reason: trigger.dev's 7,109-commit walk runs for hours at the per-commit cost of the function and generated checks; the training freeze now walks its newest 1,500. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
6f9613329e
commit
1d1c87f63b
@@ -448,7 +448,7 @@ def test_insufficient_negatives_and_invalid_ratio(pair, tmp_path, monkeypatch):
|
||||
with pytest.raises(ValueError, match="ordinary_floor"): # Rejected is a ValueError with a fixed reason code
|
||||
assemble.freeze(tmp_path / "default", **kwargs)
|
||||
result = assemble.freeze(tmp_path / "train", floor=20, **kwargs)
|
||||
assert result["ordinary_floor"] == 20 and result["negative_ratio"] == 20
|
||||
assert result["ordinary_floor"] == 20 and result["negative_ratio"] == 20 and result["history_limit"] is None
|
||||
# Twenty eligible commits for a ratio of twenty: every one of them is drawn, none twice.
|
||||
ordinary = [c for c in replay.load_slice(tmp_path / "train/pool-valid.toml", 1) if c["kind"] == "ordinary"]
|
||||
assert len(ordinary) == 20 and len({c["head"] for c in ordinary}) == 20
|
||||
|
||||
Reference in New Issue
Block a user