TypeError: __init__() got an unexpected keyword argument 'report_to'
Author: TatProg
Pull request: no

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version: 4.6.1
- Platform: Linux-4.15.0-135-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.9.0+cu102 (True)
- Tensorflow version (GPU?): not installed (NA)
- Using GPU in script?: Yes, 8 Tesla V100
- Using distributed or parallel set-up in script?: training_args.parallel_mode = ParallelMode.NOT_DISTRIBUTED

### Who can help
@sgugger @LysandreJik
<!-- Your issue will be replied to more quickly if you can figure out the right person to tag with @
 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- albert, bert, xlm: @LysandreJik
- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj
- longformer, reformer, transfoxl, xlnet: @patrickvonplaten
- fsmt: @stas00
- funnel: @sgugger
- gpt2: @patrickvonplaten, @LysandreJik
- rag: @patrickvonplaten, @lhoestq
- tensorflow: @Rocketknight1

Library:

- benchmarks: @patrickvonplaten
- deepspeed: @stas00
- ray/raytune: @richardliaw, @amogkam
- text generation: @patrickvonplaten
- tokenizers: @LysandreJik
- trainer: @sgugger
- pipelines: @LysandreJik

Documentation: @sgugger

Model hub:

- for issues with a model report at https://discuss.huggingface.co/ and tag the model's creator.

HF projects:

- datasets: [different repo](https://github.com/huggingface/datasets)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj
- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->

## Information

Model I am using BERT - 'bert-base-multilingual-cased'

The problem arises when using:
* [x] the official example scripts.

The tasks I am working on is:
* [x] an official GLUE/SQUaD task: Masked Language Modelling 

## To reproduce

Steps to reproduce the behavior:
0. Install wandb and tensorboard via Command Line
```
pip install wandb
wandb login
WANDB_PROJECT=mlm_project

pip install tf-nightly
pip install tensorboard
```
1. Initialize training_args
```python
training_args = TrainingArguments(
    output_dir='My_lovely_mlm_model',
    overwrite_output_dir=True,
    do_train=True,
    do_eval=True,
    per_device_train_batch_size=100,
    per_device_eval_batch_size=50,
    evaluation_strategy='steps',
    logging_steps=10_000,
    eval_steps=None,
    prediction_loss_only=True,
    num_train_epochs=50,
    save_steps=10_000,
    save_total_limit=10,

    report_to=['wandb', 'tensorboard']

)
```
2. Run script with button in PyCharm or in console with python `run_mlm.py --report_to wandb --run_name new_run_name`

3. Enjoy error message
```
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/Users/LysandreJik_is_the_best/Documents/PyCharmProjects/in_sgugger_we_trust/mlm/run_mlm.py", line 21, in <module>
    from arguments_for_mlm import model_data_args
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/Users/LysandreJik_is_the_best/Documents/PyCharmProjects/in_sgugger_we_trust/mlm/arguments_for_mlm.py", line 299, in <module>
    report_to=['wandb', 'tensorboard']
TypeError: __init__() got an unexpected keyword argument 'report_to'
```
Also, i tried to remove 'tensorboard' or 'wandb', but caught same error again and again
## Expected behavior

Script must run without this error. Wandb folder must be created. 

Comments:
Hello! Do you mind sharing a reproducible code example in colab? I ran the following on the bare `run_mlm.py` script:
```
python run_mlm.py --output_dir=here --report_to=tensorboard --dataset_name=wikitext --dataset_config_name=wikitext-2-raw-v1 --model_name_or_path=bert-base-cased --do_train
```
which works without issue. Maybe @sgugger has more insights.

Nice username and Pycharm project :)

@LysandreJik 

I found problem: I used `report_to=` in `TrainingArguments` without `run_name=`

Even if I add `--run_name=` in command `python3 run_mlm.py --report_to wandb --run_name new_run_name` it didn't work. I think this might be fixed quite easy: Throw exception, if `report_to=` is 'initialized'  in `TrainingArguments` without `run_name=`


My solution. Also tested not only with 'wandb', but with 'tensorboard' and both of them works very well. (All imports are above)
```python
training_args = TrainingArguments(
    output_dir='My_lovely_mlm_model',
    overwrite_output_dir=True,
    do_train=True,
    do_eval=True,
    per_device_train_batch_size=100,
    per_device_eval_batch_size=50,
    evaluation_strategy='steps',
    logging_steps=10_000,
    eval_steps=None,
    prediction_loss_only=True,
    num_train_epochs=50,
    save_steps=10_000,
    save_total_limit=10,

    report_to='wandb'
    run_name="new_run" #ADDED THIS.

)
```

P.S. If I want to continue training my model from checkpoint, i should change `model = AutoModelForMaskedLM.from_pretrained('bert-base-multilingual-cased')` to `model = AutoModelForMaskedLM.from_pretrained('project/pretrained_model_name/checkpoint-190000')`right?



If you use the Trainer, just use `resume_from_checkpoint=path_to_checkpoint` when calling `trainer.train`.