Open martbach opened 4 years ago
Sorry for a really long reply, is your issue still relevant?
What particular tutorial code did you follow? Can't reproduces the issue with
from deeppavlov import build_model
ner = build_model("./ner_bert_slav.json", download=True)
ner(["Это", "Берт", "из", "России"])
Hello! I just got the same error. I'm on Windows, this is a fresh Python 3.7.3 environment. My actions are as follows:
python -m pip install --upgrade pip # needed for cryptography
pip install deeppavlov==0.14.0
python -m deeppavlov install ner_ontonotes_bert_mult # for bert-dp
I install deeppavlov==0.14.0
since more recent versions apparently do not work on Windows because of the uvloop dependency: https://github.com/deepmipt/DeepPavlov/issues/1467
After this, if I run python:
Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
Type "help", "copyright", "credits" or "license" for more information.
>>> from deeppavlov import build_model
>>> ner = build_model("./ner_bert_slav.json", download=True)
2021-09-29 21:54:17.844 INFO in 'deeppavlov.core.data.utils'['utils'] at line 94: Downloading from http://files.deeppavlov.ai/deeppavlov_data/ner_bert_slav.tar.gz to C:\dev\bert_test\ner_bert_slav.tar.gz
2021-09-29 21:54:18.29 WARNING in 'deeppavlov.core.data.utils'['utils'] at line 115: Found a partial download C:\dev\bert_test\ner_bert_slav.tar.gz.part
1%|▊ | 11.9M/1.98G [00:00<?, ?B/s]2021-09-29 21:54:18.61 WARNING in 'deeppavlov.core.data.utils'['utils'] at line 119: Download stopped abruptly, trying to resume from 11862016 to reach 1978104578
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.98G/1.98G [11:52<00:00, 2.78MB/s]
2021-09-29 22:06:10.274 INFO in 'deeppavlov.core.data.utils'['utils'] at line 268: Extracting C:\dev\bert_test\ner_bert_slav.tar.gz archive into C:\dev\bert_test\Slavic-BERT-NER
[nltk_data] Downloading package punkt to
[nltk_data] C:\Users\bt\AppData\Roaming\nltk_data...
[nltk_data] Package punkt is already up-to-date!
[nltk_data] Downloading package stopwords to
[nltk_data] C:\Users\bt\AppData\Roaming\nltk_data...
[nltk_data] Package stopwords is already up-to-date!
[nltk_data] Downloading package perluniprops to
[nltk_data] C:\Users\bt\AppData\Roaming\nltk_data...
[nltk_data] Package perluniprops is already up-to-date!
[nltk_data] Downloading package nonbreaking_prefixes to
[nltk_data] C:\Users\bt\AppData\Roaming\nltk_data...
[nltk_data] Package nonbreaking_prefixes is already up-to-date!
WARNING:tensorflow:From C:\Users\bt\dp\lib\site-packages\bert_dp\tokenization.py:125: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.
2021-09-29 22:09:04.9 INFO in 'deeppavlov.core.data.simple_vocab'['simple_vocab'] at line 115: [loading vocabulary from C:\dev\bert_test\Slavic-BERT-NER\ner_bert_slav\tag.dict]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\bt\dp\lib\site-packages\deeppavlov\core\commands\infer.py", line 62, in build_model
component = from_params(component_config, mode=mode, serialized=component_serialized)
File "C:\Users\bt\dp\lib\site-packages\deeppavlov\core\common\params.py", line 95, in from_params
obj = get_model(cls_name)
File "C:\Users\bt\dp\lib\site-packages\deeppavlov\core\common\registry.py", line 70, in get_model
raise ConfigError("Model {} is not registered.".format(name))
deeppavlov.core.common.errors.ConfigError: 'Model bert_ner is not registered.'
Note that I did not used requirements.txt
since it gives me the following error:
pip install -r requirements.txt
Collecting git+https://github.com/deepmipt/bert.git@feat/multi_gpu (from -r requirements.txt (line 1))
Cloning https://github.com/deepmipt/bert.git (to revision feat/multi_gpu) to c:\users\bt\appdata\local\temp\pip-req-build-u_1db_bi
Running command git clone -q https://github.com/deepmipt/bert.git 'C:\Users\bt\AppData\Local\Temp\pip-req-build-u_1db_bi'
Resolved https://github.com/deepmipt/bert.git to commit 741d9bed9d52c6a9409ca27d8bf284615645618b
Collecting deeppavlov==0.3.0
Downloading deeppavlov-0.3.0-py3-none-any.whl (677 kB)
|████████████████████████████████| 677 kB 939 kB/s
ERROR: Could not find a version that satisfies the requirement tensorflow==1.10.0 (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 1.15.0rc0, 1.15.0rc1, 1.15.0rc2, 1.15.0rc3, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0a0, 2.0.0b0, 2.0.0b1, 2.0.0rc0, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0rc0, 2.1.0rc1, 2.1.0rc2, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0rc0, 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0)
ERROR: No matching distribution found for tensorflow==1.10.0
hello,i get some error,who can help me ?
The 'Model bert_ner is not registered' issue seems to be related to changes brought by versions of deeppavlov newer than 0.3.0
. The repo wasn't intended to work for them.
Since there are quite a few people facing the problem, the Slavic-BERT-NER repo has been updated to support the latest deeppavlov==0.17.2
. It now supports both Python3.6 and Python3.7 .
@bt2901 Your issue should be fixed with the latest updates.
@645187919 Do you get the error 'Model bert_ner is not registered'? Can you share:
deeppavlov
,tensorflow
Hello,
I am following your "tutorial", but after running your ner_evaluate.py and the model is downloaded this error occures:
deeppavlov.core.common.errors.ConfigError: 'Model bert_ner is not registered.'
What might be the case of this?
Thank you