-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pytorch_pretrained_bert vs transformers #16
Comments
Thank you for pointing that out ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The README has a link to https://github.com/huggingface/pytorch-pretrained-BERT, but this redirects to https://github.com/huggingface/transformers and I think the former is deprecated. The
pytorch-pretrained-bert
package still exists on PyPI (link), but I installedtransformers
instead. Now I'm gettingModuleNotFoundError: No module named 'pytorch_pretrained_bert'
. In line 12 shown below, I simply replacedpytorch_pretrained_bert
withtransformers
:disambiguate/python/getalp/wsd/modules/embeddings/embeddings_bert.py
Lines 8 to 14 in d6c0e75
This gets me a little further, but then I see this (partial traceback):
I looked at the following link but did not see anything about
output_all_encoded_layers
: https://github.com/huggingface/transformers#Migrating-from-pytorch-pretrained-bert-to-transformersI saw huggingface/transformers#3541 and then changed line 13 above to have the parameter
output_hidden_states=False
and removed theoutput_all_encoded_layers=False
parameter from line 69 (shown below):disambiguate/python/getalp/wsd/modules/embeddings/embeddings_bert.py
Line 69 in d6c0e75
After this I was able to get some output. Can you confirm if these changes are sufficient? If so I can put together a PR for the fix.
The text was updated successfully, but these errors were encountered: