Models cannot be loaded if they have dot "." in name
### System Info

- `transformers` version: 4.24.0
- Platform: Linux-5.14.0-1054-oem-x86_64-with-glibc2.31
- Python version: 3.9.15
- Huggingface_hub version: 0.10.1
- PyTorch version (GPU?): 1.13.0+cpu (False)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: no
- Using distributed or parallel set-up in script?: no

### Who can help?

@NielsRogge @LysandreJik

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

Try to use `google/mobilenet_v2_1.0_224`:
```
    model = AutoModelForImageClassification.from_pretrained(
        "google/mobilenet_v2_1.0_224",
        num_labels=2,
        ignore_mismatched_sizes=True,
    )
```

I get:
```
Traceback (most recent call last):
  File "train.py", line 217, in <module>
model = AutoModelForImageClassification.from_pretrained(
  File "/opt/conda/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 434, in from_pretrained
config, kwargs = AutoConfig.from_pretrained(
  File "/opt/conda/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 796, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
  File "/opt/conda/lib/python3.8/site-packages/transformers/models/auto/configuration_auto.py", line 503, in __getitem__
raise KeyError(key)
KeyError
: 'mobilenet_v2'
```

I suspect that this happens due to line 790 in `configuration_auto.py`:
```
module_file, class_name = class_ref.split(".")
```

Since this model has a dot "." in name, it is splitted here and library is looing for `mobilenet_v2` instead, which does not exist.

### Expected behavior

Load a model from HuggingFace Hub.
Hi, @j-adamczyk. The problem here is that `transformers` version that includes `MobileNetV2` model has not yet been released to [PyPi](https://pypi.org/project/transformers/#history) etc., hence there's no `'mobilenet_v2'` key. 
Though you can install the `transformers` from source, and start using `MobileNetV2` right after.<|||||>To install from [source](https://huggingface.co/transformers/v3.5.1/installation.html#installing-from-source), clone the repository and install with the following commands:
```
git clone https://github.com/huggingface/transformers.git
cd transformers
pip install -e .
```<|||||>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/main/CONTRIBUTING.md) are likely to be ignored.<|||||>Closing as this issue seems resolved.