Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix batch size handling in prediction_loop for DataLoaderShard (huggi…
…ngface#34343) * Fix batch size handling in prediction_loop for DataLoaderShard Updated the prediction_loop method in the Trainer class to correctly handle batch size when using DataLoaderShard. This ensures that the batch size is retrieved from total_batch_size for distributed training scenarios, preventing TypeError related to NoneType during evaluation. * Update src/transformers/trainer.py Co-authored-by: Zach Mueller <[email protected]> * Applied the fix to remove unused imports --------- Co-authored-by: Zach Mueller <[email protected]>
- Loading branch information