ImportError: cannot import name 'pipeline' from 'transformers'
When trying to import TransformersReader, I am getting the following error
from haystack.reader.transformers import TransformersReader
Error :
>>> from haystack.reader.transformers import TransformersReader
ImportError: cannot import name 'pipeline' from 'transformers' (C:\ANACON~1\lib\site-packages\transformers\__init__.py)
Please note I am in the directory haystack-master. I am using windows 10.
Please help me in solving this.
Hey @boralprophecy ,
I was not able to reproduce this. What version of Transformers do you have installed? It seems that it cannot import the pipeline object from there. Haystack is currently using Transformers v2.4.0 (2.5.1 should also work, but it is not fully tested yet).
It was a version issue. During installation of FARM, transformers was in version 2.1.1 which was giving the error. Have upgraded to 2.5.1. Now it is working fine. Thanks.