While trying to import warmup_linear
, I'm getting this error
ImportError: cannot import name 'warmup_linear'
Import -
from pytorch_pretrained_bert.optimization import BertAdam, warmup_linear
Requirements file
boto3==1.9.198
botocore==1.12.198
certifi==2019.6.16
chardet==3.0.4
docutils==0.14
h5py==2.9.0
idna==2.8
jmespath==0.9.4
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
numpy==1.17.0
Pillow==6.1.0
python-dateutil==2.8.0
pytorch-pretrained-bert==0.6.2
PyYAML==5.1.1
regex==2019.6.8
requests==2.22.0
s3transfer==0.2.1
scipy==1.3.0
seqeval==0.0.12
six==1.12.0
torch==1.1.0
torchvision==0.3.0
tqdm==4.32.2
urllib3==1.25.3
What needs to be done to import 'warmup_linear'?
The version 0.4.0 doesn't give this issue.
pip install pytorch_pretrained_bert==0.4.0
or downgrading to 0.6.1 solved it.