I just tried to run run_squad.py example and I got this error:
Traceback (most recent call last):
File "run_squad.py", line 37, in <module>
from pytorch_pretrained_bert.file_utils import PYTORCH_PRETRAINED_BERT_CACHE, WEIGHTS_NAME, CONFIG_NAME
ImportError: cannot import name 'WEIGHTS_NAME' from 'pytorch_pretrained_bert.file_utils' (/mnt/Data/miniconda3/lib/python3.7/site-packages/pytorch_pretrained_bert/file_utils.py)
Same is happening for run_classifier.py
Yes the examples currently require to install from source (see the section in the readme).
I'll release a new version tomorrow so the pip release will be in sync with master examples again.
Okay, thank you :)
Waiting for this; installing from source gives the error : ImportError: cannot import name 'warmup_linear'
Waiting for this; installing from source gives the error :
ImportError: cannot import name 'warmup_linear'
It is not actually using warmup_linear so you can safely remove that from the file
Ok, I've just published and uploaded the new v0.6.2 release on pip which should fix this (among other things). Release notes are here.
Most helpful comment
Same is happening for
run_classifier.py