Unable to instantiate ImageGPTFeatureExtractor
Author: aleSuglia
Pull request: no
Labels: name: bug

### System Info

```shell
- `transformers` version: 4.19.2
- Platform: macOS-12.3.1-arm64-arm-64bit
- Python version: 3.9.9
- Huggingface_hub version: 0.4.0
- PyTorch version (GPU?): 1.11.0 (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 @sgugger

Looks like the `ImageGPTFeatureExtractor` is among the feature extractors supported at the moment but I cannot resolve it with the latest version available on Pip.
I can see it's available here: https://github.com/huggingface/transformers/blob/main/src/transformers/models/auto/feature_extraction_auto.py#L53

### Information

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

### Tasks

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

### Reproduction

Code:
```
extractor = AutoFeatureExtractor.from_pretrained("openai/imagegpt-small")
```

Stacktrace:

```
               feature_extractor_class = feature_extractor_class_from_name(feature_extractor_class)
    
>           return feature_extractor_class.from_dict(config_dict, **kwargs)
E           AttributeError: 'NoneType' object has no attribute 'from_dict'
```

### Expected behavior

```shell
Loads feature extractor without any exception.
```


Comments:
This is because you do not have `Pillow` installed. We have fixed the error message in #17289 (will be in the next release but is not in 4.19.2) to let you know explicitly you should do `pip install pillow`.

Thanks @sgugger but unfortunately installing Pillow didn't fix it for me. While debugging, I can see that the method `feature_extractor_class_from_name` fails to return the correct class and returns `None` instead.

I guess it's because in my local installation `FEATURE_EXTRACTOR_MAPPING_NAMES` is defined as follows:

```python
FEATURE_EXTRACTOR_MAPPING_NAMES = OrderedDict(
    [
        ("beit", "BeitFeatureExtractor"),
        ("detr", "DetrFeatureExtractor"),
        ("deit", "DeiTFeatureExtractor"),
        ("hubert", "Wav2Vec2FeatureExtractor"),
        ("speech_to_text", "Speech2TextFeatureExtractor"),
        ("vit", "ViTFeatureExtractor"),
        ("wav2vec2", "Wav2Vec2FeatureExtractor"),
        ("detr", "DetrFeatureExtractor"),
        ("layoutlmv2", "LayoutLMv2FeatureExtractor"),
        ("clip", "CLIPFeatureExtractor"),
        ("flava", "FlavaFeatureExtractor"),
        ("perceiver", "PerceiverFeatureExtractor"),
        ("swin", "ViTFeatureExtractor"),
        ("vit_mae", "ViTFeatureExtractor"),
        ("segformer", "SegformerFeatureExtractor"),
        ("convnext", "ConvNextFeatureExtractor"),
        ("van", "ConvNextFeatureExtractor"),
        ("resnet", "ConvNextFeatureExtractor"),
        ("regnet", "ConvNextFeatureExtractor"),
        ("poolformer", "PoolFormerFeatureExtractor"),
        ("maskformer", "MaskFormerFeatureExtractor"),
        ("data2vec-audio", "Wav2Vec2FeatureExtractor"),
        ("data2vec-vision", "BeitFeatureExtractor"),
        ("dpt", "DPTFeatureExtractor"),
        ("glpn", "GLPNFeatureExtractor"),
        ("yolos", "YolosFeatureExtractor"),
    ]
)
```
So it's clearly missing `imagegpt` and this justifies the fail. Any ideas? 

I verified that my version of Transformers is the following:

```
Name: transformers
Version: 4.19.2
Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow
Home-page: https://github.com/huggingface/transformers
Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors)
Author-email: transformers@huggingface.co
License: Apache
Location: /Users/as2180/workspace/perceptual-simulator/.venv/lib/python3.9/site-packages
Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, tokenizers, tqdm
```

Instead if I install the version from Github, I can get the correct file. Is the wheel on pip up to date?

Hi,

This was fixed yesterday (#16871) so you need to install Transformers from source:

```
pip install git+https://github.com/huggingface/transformers.git
```

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.