Error when running run_clm.py on Python3.9/MacOS
Author: liyucheng09
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.1.1
- Platform: macOS-11.0-arm64-arm-64bit
- Python version: 3.9.1
- PyTorch version (GPU?): 1.8.0a0+c20b916 (False)
- Tensorflow version (GPU?): not installed 
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No

## Information

Model I am using (Bert, XLNet ...): GPT2

The problem arises when using:
* [yes ] the official example scripts: (give details below)

The tasks I am working on is:
* [no] an official GLUE/SQUaD task: language-modeling task; dataset: wikitext

## To reproduce

Steps to reproduce the behavior:

1. install transformers from the master branch of version 4.1.1
2. run examples/language-modeling/run_clm.py
3. arguments are as following: `--model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir test-clm/`

<!-- If you have code snippets, error messages, stack traces please provide them here as well.
     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->
```
/Users/liyucheng/miniforge3/bin/python /Users/liyucheng/projects/comments_generation/run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir test-clm/
Traceback (most recent call last):
  File "/Users/liyucheng/projects/comments_generation/run_clm.py", line 388, in <module>
    main()
  File "/Users/liyucheng/projects/comments_generation/run_clm.py", line 145, in main
    parser = HfArgumentParser((ModelArguments, DataTrainingArguments, TrainingArguments))
  File "/Users/liyucheng/miniforge3/lib/python3.9/site-packages/transformers/hf_argparser.py", line 52, in __init__
    self._add_dataclass_arguments(dtype)
  File "/Users/liyucheng/miniforge3/lib/python3.9/site-packages/transformers/hf_argparser.py", line 85, in _add_dataclass_arguments
    elif hasattr(field.type, "__origin__") and issubclass(field.type.__origin__, List):
  File "/Users/liyucheng/miniforge3/lib/python3.9/typing.py", line 829, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class

Process finished with exit code 1
```
This error is bizarre cause it only occurs on my OSX and I cannot reproduce it on my PC.

I think the main reason is about the decorator `dataset`, but I am not sure about that.

Thanks for any helps.

Comments:
It seems quite cryptic, but maybe @sgugger has already been confronted to that issue, so pinging him here.

Never seen this before. There is some code in the HFArgumentParser to make it work with Python 3.9 that was added by @julien-c so maybe he has more insight?

I want to provide more valuable information about this issue.

The field of the corresponding argument `--model_name_of_path` on my Mac/Python3.9 is like the following:

```
Field(name='model_name_or_path',type=typing.Optional[str],default=None,default_factory=<dataclasses._MISSING_TYPE object at 0x1065a6220>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({'help': "The model checkpoint for weights initialization.Don't set if you want to train a model from scratch."}),_field_type=_FIELD)
```

However, it is different on my PC/Python3.7.9.

```
Field(name='model_name_or_path',type=typing.Union[str, NoneType],default=None,default_factory=<dataclasses._MISSING_TYPE object at 0x00000227D9888A48>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({'help': "The model checkpoint for weights initialization.Don't set if you want to train a model from scratch."}),_field_type=_FIELD)
```

The critical change of it is the `type` attribute. The function in `transformers/data_classes.py` do not give `type=typing.Optional[str]` a appropriate solution.

But, I have no idea why the `type` attribute has that different value when I run it on Mac/Python3.9.1.

#9479 will fix this I believe.

Closed by #9479!