Enable passing config directly to PretrainedConfig.from_pretrained()
The `PretrainedConfig` class has a method for loading configs `from_pretrained()`. As the documentation states, the input can be either a string or a path to a config file:

```
            pretrained_model_name_or_path (:obj:`str` or :obj:`os.PathLike`):
                This can be either:

                - a string, the `model id` of a pretrained model configuration hosted inside a model repo on
                  huggingface.co. Valid model ids can be located at the root-level, like ``bert-base-uncased``, or
                  namespaced under a user or organization name, like ``dbmdz/bert-base-german-cased``.
                - a path to a `directory` containing a configuration file saved using the
                  :func:`~transformers.PretrainedConfig.save_pretrained` method, e.g., ``./my_model_directory/``.
                - a path or url to a saved configuration JSON `file`, e.g.,
                  ``./my_model_directory/configuration.json``.
```

**Request:** I would like to be able to pass the config dictionary directly to this function.

**Motivation:** if I have a config in memory, I shouldn't have to write the config to disk and then pass that file path to the method.

**Proposed Solution:** Add an extra argument `config_dict` and then replace

```
config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
```

with something like

```
if config_dict is not None and pretrained_model_name_or_path is not None:
    assert ValueError('Only one of config_dict and pretrained_model_name_or_path can be provided.`)
if config_dict is None:
    config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
```
My current workaround isn't onerous, but I feel like this my request is pretty simple :)

```
    student_config = some dict
    # Frustratingly, the .from_pretrained method doesn't permit passing a config directly.
    # Consequently, we write the config to disk and then pass that path.
    os.makedirs('tmp', exist_ok=True)
    with open('tmp/student_config.json', 'w') as fp:
        json.dump(obj=student_config, fp=fp)
    stu_architecture_config = student_config_class.from_pretrained('tmp/student_config.json')

```<|||||>Hi @RylanSchaeffer, this can be done with the `from_dict` method.

```
config = BertConfig.from_pretrained("bert-base-uncased", hidden_dropout_prob=0.5)
second_config = BertConfig.from_dict(config.to_dict())

print(second_config.hidden_dropout_prob) # output: 0.5
```<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.