Documentation for the Trainer API
Author: sgugger
Pull request: yes

This PR introduces documentation for the Trainer/TFTrainer classes and the argument dataclasses.

While documenting, I noticed that the method `Trainer.evaluate` and `TFTrainer.evaluate` had an argument `pred_loss_only` which was not used at all (my guess is that it's the same argument passed at init that is used). I removed that argument. I'm aware this is a breaking change but, as a user, I'd expect a hard error when passing something that is not used at all. Let me know if there was a good reason for it.

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/5383?src=pr&el=h1) Report
> Merging [#5383](https://codecov.io/gh/huggingface/transformers/pull/5383?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/0267668c3d648c6e41afda97f5df8671ee880ac3&el=desc) will **decrease** coverage by `0.19%`.
> The diff coverage is `77.71%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/5383/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/5383?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #5383      +/-   ##
==========================================
- Coverage   77.01%   76.81%   -0.20%     
==========================================
  Files         128      138      +10     
  Lines       21615    24314    +2699     
==========================================
+ Hits        16646    18676    +2030     
- Misses       4969     5638     +669     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/5383?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/configuration\_albert.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2FsYmVydC5weQ==) | `100.00% <ø> (ø)` | |
| [src/transformers/configuration\_ctrl.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2N0cmwucHk=) | `97.05% <ø> (ø)` | |
| [src/transformers/configuration\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2Rpc3RpbGJlcnQucHk=) | `100.00% <ø> (ø)` | |
| [src/transformers/configuration\_encoder\_decoder.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2VuY29kZXJfZGVjb2Rlci5weQ==) | `100.00% <ø> (ø)` | |
| [src/transformers/configuration\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2dwdDIucHk=) | `97.22% <ø> (ø)` | |
| [src/transformers/configuration\_longformer.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2xvbmdmb3JtZXIucHk=) | `100.00% <ø> (ø)` | |
| [src/transformers/configuration\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX29wZW5haS5weQ==) | `97.14% <ø> (ø)` | |
| [src/transformers/configuration\_reformer.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3JlZm9ybWVyLnB5) | `100.00% <ø> (ø)` | |
| [src/transformers/configuration\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3JvYmVydGEucHk=) | `100.00% <ø> (ø)` | |
| [src/transformers/configuration\_t5.py](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3Q1LnB5) | `96.42% <ø> (ø)` | |
| ... and [157 more](https://codecov.io/gh/huggingface/transformers/pull/5383/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/5383?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/5383?src=pr&el=footer). Last update [482a599...c56586e](https://codecov.io/gh/huggingface/transformers/pull/5383?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Great! Much needed! Also adding @thomwolf who might want to chime in

The TF documentation looks much better!! :smile: Thanks @sgugger 

Thanks for catching all my bad copy-pastes @jplu 
Concerning `n_gpu`, I think the change of name to `n_replica`/`n_device` might be welcome, especially since it does not represent the same thing as `n_gpu` in the PyTorch `Trainer` (which is only more than 1 when using dp instead of ddp). But that probably would go better in another PR!