ImportError: cannot import name 'WEIGHTS_NAME' from 'pytorch_pretrained_bert.file_utils'
See original GitHub issueI 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)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Unable to import BERT model with all packages - Stack Overflow
I am facing the below error. ImportError: cannot import name '_LazyModule' from 'transformers.file_utils' (/usr/local/lib/python3.7/dist- ...
Read more >pytorch-pretrained-bert - PyPI
This package comprises the following classes that can be imported in Python and are detailed in the Doc section of this readme: Eight...
Read more >How to resolve the hugging face error ImportError: cannot ...
I got the following error with code: from pathlib import Path import ... import is_tokenizers_available ImportError: cannot import name ...
Read more >How to Fix : “ImportError: Cannot import name X” in Python
The import error might occur in numerous cases and scenarios. ... In Python "ImportError: cannot import name" error generally occurs when the imported...
Read more >发布 · mirrors / huggingface / pytorch-pretrained-bert - GitCode
Module by @michaelbenayoun in #18457; Update no trainer scripts for ... TF: correct TFBart embeddings weights name when load_weight_prefix is passed by ...
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
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.