AttributeError: 'Trainer' object has no attribute 'log_metrics'
## Environment info

- `transformers` version: 4.3.3
- Platform: Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.10
- PyTorch version (GPU?): 1.7.1+cu101 (True)
- Tensorflow version (GPU?): 2.4.1 (True)
- Using GPU in script?: True
- Using distributed or parallel set-up in script?: False

### Who can help

@sgugger

## Information

Model I am using (Bert, XLNet ...): Bert

The problem arises when using:
* [x] the official example scripts: (give details below)
* [ ] my own modified scripts: (give details below)
`examples/language-modeling/run_mlm.py`

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)
* [x] my own task or dataset: (give details below) 
Just a usual txt file with texts line by line.

Logging on the epoch's end of mlm training fails:

```
Traceback (most recent call last):
  File "examples/language-modeling/run_mlm.py", line 442, in <module>
    main()
  File "examples/language-modeling/run_mlm.py", line 416, in main
    trainer.log_metrics("train", metrics)
AttributeError: 'Trainer' object has no attribute 'log_metrics'
```

## To reproduce

Steps to reproduce the behavior:

```
pip install transformers
cd transformers
python examples/language-modeling/run_mlm.py \
    --model_name_or_path Geotrend/bert-base-ru-cased \
    --train_file <path to train file> \
    --validation_file <path to validation file> \
    --do_train \
    --do_eval \
    --num_train_epochs 1 \
    --output_dir <path to output dir> \
    --save_steps 10000 \
    --line_by_line True
```

## Expected behavior

It works after checkout to the previous commit, [b01483f](https://github.com/huggingface/transformers/commit/b01483faa0cfb57369cbce153c671dbe48cc0638)  :

```
02/28/2021 14:00:45 - INFO - __main__ -   ***** Train results *****
02/28/2021 14:00:45 - INFO - __main__ -     epoch = 1.0
02/28/2021 14:00:45 - INFO - __main__ -     train_runtime = 1091.7453
02/28/2021 14:00:45 - INFO - __main__ -     train_samples_per_second = 70.642
02/28/2021 14:00:45 - INFO - __main__ -   *** Evaluate ***
[INFO|trainer.py:1600] 2021-02-28 14:00:45,719 >> ***** Running Evaluation *****
[INFO|trainer.py:1601] 2021-02-28 14:00:45,719 >>   Num examples = 154244
[INFO|trainer.py:1602] 2021-02-28 14:00:45,719 >>   Batch size = 8
100% 19281/19281 [06:56<00:00, 46.28it/s]
02/28/2021 14:07:42 - INFO - __main__ -   ***** Eval results *****
02/28/2021 14:07:42 - INFO - __main__ -     perplexity = 4.859176983612205
```

Hi there. As is mentioned at the very beginning of the [examples README](https://github.com/huggingface/transformers/tree/master/examples#important-note), running the examples requires an install from source.

If you want the examples associated with v4.3.3, you can find them [here](https://github.com/huggingface/transformers/tree/v4.3.3/examples).