Weird bugs when using ```run_image_classification.py```
### System Info

Dear authors,

Thanks for your great work. I had a small dataset as I share with you here: https://drive.google.com/drive/folders/1-GAFdH0S16SlYXPdOwDmqijCrpIeeLbm?usp=sharing.

When I trained a ViT for image classification from ```run_image_classification.py```, my command as I attached:
```
!CUDA_DIVISIBLE_DEVICES=0, python3 run_image_classification.py \
    --train_dir $TRAIN_DIR \
    --output_dir $OUTPUT_DIR \
    --remove_unused_columns False \
    --do_train \
    --do_eval \
    --learning_rate 2e-5 \
    --num_train_epochs 10 \
    --per_device_train_batch_size 32 \
    --per_device_eval_batch_size 32 \
    --logging_strategy steps \
    --logging_steps 10 \
    --evaluation_strategy epoch \
    --save_strategy epoch \
    --load_best_model_at_end True \
    --save_total_limit 3 \
    --seed 1337 \
    --overwrite_output_dir
```

I got an error:
```
Traceback (most recent call last):
  File "run_image_classification.py", line 388, in <module>
    main()
  File "run_image_classification.py", line 240, in main
    task="image-classification",
  File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 1681, in load_dataset
    **config_kwargs,
  File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 1453, in load_dataset_builder
    data_files=data_files,
  File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 1089, in dataset_module_factory
    download_mode=download_mode,
  File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 701, in get_module
    base_path=base_path,
  File "/usr/local/lib/python3.7/dist-packages/datasets/data_files.py", line 801, in from_local_or_remote
    if not isinstance(patterns_for_key, DataFilesList)
  File "/usr/local/lib/python3.7/dist-packages/datasets/data_files.py", line 763, in from_local_or_remote
    data_files = resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions)
  File "/usr/local/lib/python3.7/dist-packages/datasets/data_files.py", line 368, in resolve_patterns_locally_or_by_urls
    raise FileNotFoundError(error_msg)
FileNotFoundError: Unable to resolve any data file that matches '['/content/drive/MyDrive/EOS/OVO/AF/**']' at /content/drive/MyDrive/EOS/codes
```

while if I do: 
```
os.listdir("/content/drive/MyDrive/EOS/OVO/AF/")
```
I got:
```
['Altered_material', 'Free_crystal', 'Lithic', 'Juvenile']
```

And all the images are still there. May I ask if you have any advice?

Thanks! I look forward hearing you asap!

### Who can help?

_No response_

### Information

- [X] The official example scripts
- [ ] 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

As above

### Expected behavior

As above
Hi,

Could you check whether [this part of the code](https://github.com/huggingface/transformers/blob/2308f3d42cff281cecee413f97f19044f54636d7/examples/pytorch/image-classification/run_image_classification.py#L231-L241) runs fine?<|||||>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.