transformers
92bcdff2 - Fix batch size handling in prediction_loop for DataLoaderShard (#34343)

Commit
1 year ago
Fix batch size handling in prediction_loop for DataLoaderShard (#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 <muellerzr@gmail.com> * Applied the fix to remove unused imports --------- Co-authored-by: Zach Mueller <muellerzr@gmail.com>
Author
Parents
Loading