ImportError with pytorch-pretrained-bert==0.6.1 and script
See original GitHub issueMight be due to the fact that we are synced with github source repo but pypi is not updated yet (my current config is pytorch-pretrained-bert==0.6.1).
ImportError Traceback (most recent call last)
<ipython-input-5-be760d1df3ec> in <module>()
1 from cdqa.utils.converter import generate_squad_examples
2 from cdqa.retriever.tfidf_doc_ranker import predict_document_retriever
----> 3 from cdqa.reader.bertqa_sklearn import BertProcessor, BertQA
~/cdQA/cdqa/reader/bertqa_sklearn.py in <module>()
35 from tqdm.autonotebook import tqdm, trange
36
---> 37 from pytorch_pretrained_bert.file_utils import PYTORCH_PRETRAINED_BERT_CACHE, WEIGHTS_NAME, CONFIG_NAME
38 from pytorch_pretrained_bert.modeling import BertForQuestionAnswering, BertConfig
39 from pytorch_pretrained_bert.optimization import BertAdam, warmup_linear
ImportError: cannot import name 'WEIGHTS_NAME'
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
ImportError: cannot import name '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.
Read more >Source code for transformers.modeling_gpt2 - Hugging Face
error("Loading a TensorFlow model in PyTorch, requires TensorFlow to be installed. Please see " "https://www.tensorflow.org/install/ for installation ...
Read more >natural-language-processing/pytorch-pretrained-BERT - Gitee
print("This script will loop over the available data, but training diversity may be negatively impacted.") num_data_epochs = i. break. else: num_data_epochs ...
Read more >How to load the pre-trained BERT model from local/colab ...
@ Astariul im getting ImportError:. I want to train the bert masked language model on custom corpus ,i followed the step shared in...
Read more >pytorch get_linear_schedule_with_warmup - You.com | The AI ...
[ x] the official example scripts: (give details) ... ImportError: cannot import name 'getlinearschedulewithwarmup' ... Created almost 6 years ago.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok perfect. It seems HF will release their update tomorrow so this should be resolved. See: https://github.com/huggingface/pytorch-pretrained-BERT/issues/523
However this may happen again and in this case we better build the HF repo from source as you did.
Yes, I did a git pull from
develop
branch this morning