KeyError: 'eval_metric-name' in trainer.py, line 2339
### System Info

Latest `transformers` version from the `main` branch, running on Ubuntu

```python
  File "code-cli.py", line 347, in <module>
    main(sys.argv[1:])
  File "code-cli.py", line 281, in main
    train_result = trainer.train(resume_from_checkpoint=checkpoint)
  File "[..]/python3.10/site-packages/transformers/trainer.py", line 1631, in train
    return inner_training_loop(
  File "[..]/python3.10/site-packages/transformers/trainer.py", line 1975, in _inner_training_loop
    self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
  File "[..]/python3.10/site-packages/transformers/trainer.py", line 2236, in _maybe_log_save_evaluate
    self._save_checkpoint(model, trial, metrics=metrics)
  File "[..]/python3.10/site-packages/transformers/trainer.py", line 2339, in _save_checkpoint
    metric_value = metrics[metric_to_check]
KeyError: 'eval_metric-name'
```

### 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, ...)
- [X] My own task or dataset (give details below)

### Reproduction

Seq2seq training on NQ

### Expected behavior

```python
  File "code-cli.py", line 347, in <module>
    main(sys.argv[1:])
  File "code-cli.py", line 281, in main
    train_result = trainer.train(resume_from_checkpoint=checkpoint)
  File "[..]/python3.10/site-packages/transformers/trainer.py", line 1631, in train
    return inner_training_loop(
  File "[..]/python3.10/site-packages/transformers/trainer.py", line 1975, in _inner_training_loop
    self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
  File "[..]/python3.10/site-packages/transformers/trainer.py", line 2236, in _maybe_log_save_evaluate
    self._save_checkpoint(model, trial, metrics=metrics)
  File "[..]/python3.10/site-packages/transformers/trainer.py", line 2339, in _save_checkpoint
    metric_value = metrics[metric_to_check]
KeyError: 'eval_metric-name'
```
Without seeing the code you run and how it was launched, there is very little we can do to help you.<|||||>@sgugger no worries it's just to be able to reference to an issue when/if I submit a pull request