impira / docquery

An easy way to extract information from documents
MIT License
1.7k stars 126 forks source link

failed to import pipeline #57

Open theobouwman opened 1 year ago

theobouwman commented 1 year ago
from docquery import document, pipeline

gets me

Failed to import docquery.transformers_patch because of the following error (look up to see its traceback):
Failed to import transformers.pipelines because of the following error (look up to see its traceback):
cannot import name 'AutoModelForDepthEstimation' from 'transformers.models.auto.modeling_auto' (/Users/theobouwman/dev/projects/test/venv/lib/python3.10/site-packages/transformers/models/auto/modeling_auto.py)
logan-markewich commented 1 year ago

Seems like an issue with the transformers version. Try upgrading to 4.24.

The reqs say >=4.23, but I don't see AutoModelForDepthEstimation in 4.23

jiluojiluo commented 1 year ago
from docquery import document, pipeline

gets me

Failed to import docquery.transformers_patch because of the following error (look up to see its traceback):
Failed to import transformers.pipelines because of the following error (look up to see its traceback):
cannot import name 'AutoModelForDepthEstimation' from 'transformers.models.auto.modeling_auto' (/Users/theobouwman/dev/projects/test/venv/lib/python3.10/site-packages/transformers/models/auto/modeling_auto.py)

when I upgrate the transformers to 4.26, "from docquery import document, pipeline" this code works, YES.