# Unable to load the transformer.trainer

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-load-the-transformer-trainer%2F51853%3E%5C
**Category:** 🤗Transformers\
**Created:** [August 23, 2023, 4:18pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-load-the-transformer-trainer%2F51853 "2023-08-23T16:18:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Awais123](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Awais123](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAwais123)%5C
**Post date:** [August 23, 2023, 4:18pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funable-to-load-the-transformer-trainer%2F51853%2F1 "2023-08-23T16:18:29Z")

</div>

## Imports: from transformers import TrainingArguments,DataCollatorForSeq2Seq

from transformers import AutoModelForSeq2SeqLM, AutoTokenizer  
from datasets import load\_dataset,load\_from\_disk  
from transformers import Trainer  
import torch

#### AttributeError Traceback (most recent call last) File [c:\conda\Lib\site-packages\transformers\utils\import\_utils.py:1099](file:///C:/conda/Lib/site-packages/transformers/utils/import\_utils.py:1099), in \_LazyModule._get\_module(self, module\_name) 1098 try: → 1099 return importlib.import\_module(“.” + module\_name, self. **name** ) 1100 except Exception as e: File [c:\conda\Lib\importlib\_init_.py:126](file:///C:/conda/Lib/importlib/ **init**.py:126), in import\_module(name, package) 125 level += 1 → 126 return \_bootstrap.\_gcd\_import(name[level:], package, level) File :1204, in \_gcd\_import(name, package, level) File :1176, in _find\_and\_load(name, import_) File :1147, in _find\_and\_load\_unlocked(name, import_) File :690, in \_load\_unlocked(spec) File :940, in exec\_module(self, module) File :241, in \_call\_with\_frames\_removed(f, \*args, \*\*kwds) File [c:\conda\Lib\site-packages\transformers\trainer.py:63](file:///C:/conda/Lib/site-packages/transformers/trainer.py:63) 62 from .modelcard import TrainingSummary

…

1103 f" traceback):\n{e}" 1104 ) from e RuntimeError: Failed to import transformers.trainer because of the following error (look up to see its traceback): module ‘tensorflow’ has no attribute ‘io’

#### Main Error: f" traceback):\n{e}" 1104 ) from e RuntimeError: Failed to import transformers.trainer because of the following error (look up to see its traceback): module ‘tensorflow’ has no attribute ‘io’
