microsoft / unilm

Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities
https://aka.ms/GeneralAI
MIT License
19.65k stars 2.51k forks source link

I am trying to run layoutxlm and facing this error : ImportError: cannot import name 'auto_class_factory' from 'transformers.models.auto.modeling_auto' #438

Open MuhammadBilal121 opened 3 years ago

MuhammadBilal121 commented 3 years ago

Describe the bug Model I am using (UniLM, MiniLM, LayoutLM ...):

The problem arises when using:

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

sz-lcw commented 3 years ago

I think you can find some suggestion in here: https://github.com/huggingface/transformers/issues/13591

ranpox commented 2 years ago

The layoutlmft depends on transformers==4.5.1. https://github.com/microsoft/unilm/blob/4ed561d5961e4c90a17b8ecad17d1f64db107e97/layoutlmft/requirements.txt#L7 Please check the installed transformers version by executing pip list | grep transformers