Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace held_out_split with select_train_val_splits #133

Merged
merged 4 commits into from
Mar 17, 2023
Merged

Conversation

norabelrose
Copy link
Member

This PR factors out the logic for determining which splits of a dataset should be used for training & validation into a function in data_utils.py called select_train_val_splits. This replaces the older held_out_split function which was less robust.

@norabelrose norabelrose requested review from lauritowal and AlexTMallen and removed request for lauritowal March 16, 2023 20:34
Copy link
Collaborator

@AlexTMallen AlexTMallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Split.TEST: 2,
}
splits = sorted(raw_splits, key=lambda k: priorities.get(k, 100)) # type: ignore
assert len(splits) >= 2, "Must have train and val/test splits"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error message is no longer true: should say "must have at least two of train, val, and test splits".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah

@norabelrose norabelrose merged commit 1bb7f1e into main Mar 17, 2023
@norabelrose norabelrose deleted the split-fix2 branch March 17, 2023 05:45
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.

None yet

2 participants