-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Remove unnecessary columns for all dataset types in Trainer
#17166
Remove unnecessary columns for all dataset types in Trainer
#17166
Conversation
cc @sgugger |
The documentation is not available anymore as the PR was closed or merged. |
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.
Thanks for your PR. I'm confused as to why the check is whether the dataset is an instance of a PyTorch IterableDataset
. Shouldn't it be any dataset that is not a datasets.Dataset
?
Ah, yeah, we don't need to check whether it's an iterable dataset! Let me fix that |
IterableDataset
s in Trainer
Trainer
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.
Thanks a lot for iterating through this!
…gface#17166) * Remove unneeded columns for IterableDataset * Add test * Update trainer tests * Edit docstring * Lint * Apply feedback * Apply feedback
…gface#17166) * Remove unneeded columns for IterableDataset * Add test * Update trainer tests * Edit docstring * Lint * Apply feedback * Apply feedback
…gface#17166) * Remove unneeded columns for IterableDataset * Add test * Update trainer tests * Edit docstring * Lint * Apply feedback * Apply feedback
What does this PR do?
As discussed with @sgugger offline, this PR adds automatic removal of unnecessary columns for arbitrary dataset types. This mimics the already present logic for removing unnecessary columns from
datasets.Dataset
s, but uses a wrapper around the data collation function to enable it for other datasets. The end result is intended to be the same for both cases.The implementation is a bit more complex than it really has to be, in order to facilitate the same logging UX as with the
datasets.Dataset
case.Tests have been added/updated where applicable.
Before submitting
Pull Request section?
Was this discussed/approved via a Github issue or the forum? Please add a linkDiscussed on Slack!to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.