# Failed to import transformers.trainer

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffailed-to-import-transformers-trainer%2F54026%3E%5C
**Category:** 🤗Transformers\
**Created:** [September 8, 2023, 2:38am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffailed-to-import-transformers-trainer%2F54026 "2023-09-08T02:38:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shashank14](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Shashank14](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FShashank14)%5C
**Post date:** [September 8, 2023, 2:38am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffailed-to-import-transformers-trainer%2F54026%2F1 "2023-09-08T02:38:21Z")

</div>

Hi, I am trying to import trainer and I am getting the below error:

RuntimeError: Failed to import transformers.trainer because of the following error (look up to see its traceback):  
Can’t instantiate abstract class MPS\_Accelerator with abstract methods supported\_dtypes

```auto
Package Version
------------------ -----------
accelerate 0.22.0
bitsandbytes 0.41.1
certifi 2023.7.22
charset-normalizer 3.2.0
deepspeed 0.10.2
einops 0.6.1
filelock 3.12.3
fsspec 2023.9.0
hjson 3.1.0
huggingface-hub 0.16.4
idna 3.4
Jinja2 3.1.2
MarkupSafe 2.1.3
mpmath 1.3.0
networkx 3.1
ninja 1.11.1
numpy 1.24.4
packaging 23.1
pip 23.2.1
psutil 5.9.5
py-cpuinfo 9.0.0
pydantic 1.10.12
pydevd-pycharm 232.9559.58
PyYAML 6.0.1
regex 2023.8.8
requests 2.31.0
safetensors 0.3.3
setuptools 68.0.0
sympy 1.12
tokenizers 0.13.3
torch 2.0.1
tqdm 4.66.1
transformers 4.33.0
typing_extensions 4.7.1
urllib3 2.0.4
wheel 0.38.4

```
