MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / test_split_stratified

Function test_split_stratified

tests/test_data_split.py:47–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46
47def test_split_stratified():
48 rows = _make_rows()
49 train, cal, holdout = stratified_3way_split(rows, seed=42)
50 train_bks = {r["benchmark"] for r in train}
51 holdout_bks = {r["benchmark"] for r in holdout}
52 assert "bk1" in train_bks
53 assert "bk2" in train_bks
54 assert "bk1" in holdout_bks

Callers

nothing calls this directly

Calls 2

stratified_3way_splitFunction · 0.90
_make_rowsFunction · 0.85

Tested by

no test coverage detected