diff --git a/skillopt_sleep/mine.py b/skillopt_sleep/mine.py index f435519f..818be073 100644 --- a/skillopt_sleep/mine.py +++ b/skillopt_sleep/mine.py @@ -341,6 +341,12 @@ def _promote_one(*, to: str, from_splits: set[str]) -> None: # Only promote from train so hash-assigned test tasks stay untouched. if len(real) >= 2 and not any(t.split == "val" for t in real): _promote_one(to="val", from_splits={"train"}) + if not any(t.split == "val" for t in real): + import logging + logging.getLogger("skillopt_sleep").warning( + "holdout_leaked: all real tasks hashed to test, pulling one for val" + ) + _promote_one(to="val", from_splits={"test"}) # Guarantee a train pool exists when possible; never borrow from test. if not any(t.split == "train" for t in tasks) and len(real) >= 2: _promote_one(to="train", from_splits={"val"})