Skip to content

fix(mine): fallback to test when both train and val are empty in assign_splits - #278

Closed
RohithPariki wants to merge 1 commit into
microsoft:mainfrom
RohithPariki:auto-fix-271
Closed

fix(mine): fallback to test when both train and val are empty in assign_splits#278
RohithPariki wants to merge 1 commit into
microsoft:mainfrom
RohithPariki:auto-fix-271

Conversation

@RohithPariki

Copy link
Copy Markdown
Contributor

Problem

assign_splits in skillopt_sleep/mine.py only reaches into train (to top up val) or from val (to top up train). If all real tasks hash into test, val and train start empty, and both guarantees no-op, causing the holdout gate to have no tasks.

Root Cause

The _promote_one(to="val", from_splits={"train"}) call when val is empty silently fails if train is also empty.

Solution

Added a fallback to promote one from test when both train and val are empty, and logged a warning for holdout_leaked.

Testing

Tested manually by running the tests.

Risk

Low risk, only triggers in the pathological case when train and val are both empty.

Issue

Closes #271

@RohithPariki
RohithPariki deleted the auto-fix-271 branch September 12, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

assign_splits's own non-empty-val guarantee doesn't fire when every real task hashes into test

1 participant