cannot import name 'Module' from '_pytest.doctest'
### System Info

transformers                 4.32.0.dev0
torch                        2.1.0.dev20230523+cu117

Error:
Traceback (most recent call last):
  File "/workspace/transformers/examples/pytorch/language-modeling/run_clm.py", line 52, in <module>
Traceback (most recent call last):
  File "/workspace/transformers/examples/pytorch/language-modeling/run_clm.py", line 52, in <module>
    from transformers.testing_utils import CaptureLogger
  File "/opt/conda/envs/ptca/lib/python3.8/site-packages/transformers-4.32.0.dev0-py3.8.egg/transformers/testing_utils.py", line 111, in <module>
    from transformers.testing_utils import CaptureLogger
  File "/opt/conda/envs/ptca/lib/python3.8/site-packages/transformers-4.32.0.dev0-py3.8.egg/transformers/testing_utils.py", line 111, in <module>
    from _pytest.doctest import (
ImportError: cannot import name 'Module' from '_pytest.doctest' (/opt/conda/envs/ptca/lib/python3.8/site-packages/_pytest/doctest.py)
    from _pytest.doctest import (

### Who can help?

@sgugger 

### 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

python -m torch.distributed.launch --nproc_per_node=8 --use-env /workspace/transformers/examples/pytorch/language-modeling/run_clm.py --model_name_or_path xlnet-base-cased --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --label_smoothing 0.1 --do_train --output_dir /dev/shm --overwrite_output_dir --max_steps 200 --logging_steps 20 --per_device_train_batch_size 8 --fp16

### Expected behavior

example runs without error
You might need a `pip install --upgrade pytest`.