transformers
transformers copied to clipboard
fix error in _get_eval_sampler when group_by_length enabled
What does this PR do?
https://github.com/huggingface/transformers/pull/33514 this PR adds group_by_length support for evaluation. But, this part uses self.eval_dataset instead of eval_dataset. So, if eval_dataset is dictionary it fails.
Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the contributor guideline, Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the forum? Please add a link to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
- [ ] Did you write any new necessary tests?
Who can review?
- trainer: @muellerzr and @SunMarc