-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Restructured split config and added datetime splitting #2132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great improvement and much cleaner compared to the existing code, thanks Travis!
2 comments:
- Assuming split_index can only be one of 3 values (0, 1 or 2), should we introduce an enum for it instead of working with integers?
- Suggestion, potentially out of scope here: add JSON schema for split
|
||
@split_registry.register("fixed") | ||
class FixedSplitter(Splitter): | ||
def __init__(self, column: str = SPLIT, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point (perhaps in separate PR), what do you think about extending this to enable users to specify custom values for fixed splits?
For example, I can imagine users with an explicit split column, but the values in the column are like "TRAIN", "TEST" instead of 0, 1, and 2.
(default)
split:
type: fixed
column: custom_split_column
train_values: [0]
validation_values: [1]
test_values: [2]
(custom)
split:
type: fixed
column: custom_split_column
train_values: [train]
validation_values: [test]
test_values: [heldout]
Related: #1823
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think we should definitely do this. Can be in a follow-up PR right after.
Closes #2129.