-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[data] add validation for shuffle arg #47055
Conversation
Signed-off-by: Matthew Deng <[email protected]>
self._include_paths = include_paths | ||
|
||
_validate_shuffle_arg(shuffle) |
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.
I wasn't sure what the best way to organize this was, I expected ParquetDatasource
to extend FileBasedDatasource
.
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.
They have different code paths because ParquetDatasource
leverages PyArrow's ParquetDataset
self._include_paths = include_paths | ||
|
||
_validate_shuffle_arg(shuffle) |
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.
They have different code paths because ParquetDatasource
leverages PyArrow's ParquetDataset
Signed-off-by: Matthew Deng <[email protected]>
Signed-off-by: Matthew Deng <[email protected]>
Signed-off-by: Matthew Deng <[email protected]>
Why are these changes needed?
Add validation for
shuffle
argument. Previously, specifying an incorrect argument would lead to the default behavior ofNone
, which does is no shuffling.Before:
After:
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.