DPRQuestionEncoder
I have installed transformers version 3.0.2.When I do afrom transformers import DPRQuestionEncoder, DPRQuestionEncoderTokenizer,I get the following error :ImportError                               Traceback (most recent call last)in----> 1 from transformers import DPRQuestionEncoder, DPRQuestionEncoderTokenizerImportError: cannot import name ‘DPRQuestionEncoder’ from ‘transformers’ (/anaconda3/lib/python3.7/site-packages/transformers/init.py)
2020-08-03T20:04:49Z
ref:https://github.com/huggingface/transformers/issues/6013,I see that dpr functionality is not available in 3.0.2.
2020-08-03T21:59:10Z
No it’s not, it was merged after, so you will need a source install for that functionality.
2020-08-03T23:07:59Z
Thanks for the reply!I did a source install, but I get an error when I try to import DPRQuestionEncoder.from transformers import DPRQuestionEncoder, DPRQuestionEncoderTokenizerImportError: cannot import name ‘DPRQuestionEncoder’I had updated PYTHONPATH to include the path to the transformers code, but that didn’t help.
2020-08-04T12:56:47Z
There must be a problem in your virtual enviromnent not using the right transformers version or your repo is not up to date. They definitely are in the repo.
2020-08-05T02:42:06Z
I hadn’t installed torch. Works now!