No metric log calculation and output after using newest version.
Hello,

I met a problem that with the same code, the Trainer in huggingface was not calculating metrics using the compute_metric function and outputed the metric logs.

When I using the older version (4.22.0) Trainer the output is like: 
![image](https://user-images.githubusercontent.com/24776624/217948354-12180c97-2100-4e93-a9d7-e365a55bc848.png)

However with new version of Trainer (4.26.1), there're only few outputs:
![image](https://user-images.githubusercontent.com/24776624/217948542-ccc3dfb7-42fa-4240-90e9-306a4f2b7464.png)

No loss and metrics define by my own function. It's really confusing and I don't konw how to solve it. Please help.  
We can't magically help you without knowing the code you are running. Please follow the issue template.<|||||>Write in template in [new issue](https://github.com/huggingface/transformers/issues/21553).