Trainer dataloader_drop_last=True looks can not work with distributed setting
### System Info

 dataloader_drop_last=True , works fine in the single GPU setting. 

But fails while using distributed launch
`python -m torch.distributed.launch --nproc_per_node $NUM_GPU --master_port $PORT_ID train_model.py`

it fails when compute metrics, I checked the shape, it's not as expected.

Thank you team,
@sgugger 

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

define a custom compute_metrics function, and set trainer with  dataloader_drop_last=True, and use distributed launch on single machine multiple GPU `python -m torch.distributed.launch --nproc_per_node $NUM_GPU --master_port $PORT_ID train_model.py`.

you can check the input of pred shape in the compute_metrics function, and found it is not correct. (doesn't drop the last)

### Expected behavior

 dataloader_drop_last=True should works fine while using `python -m torch.distributed.launch --nproc_per_node $NUM_GPU --master_port $PORT_ID train_model.py`
I have trouble understanding the bug you are reporting. If you set `dataloader_drop_last=True`, the dataloader you use for evaluation will have its last batch truncated and yes, you won't have the right number of examples.<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.