[docs] Fix the custom loss function and eval examples in the Trainer features guide (#51289)
* [docs] Fix the custom loss function and eval examples in the Trainer features guide
* Apply suggestion from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>