Closed StrikerRUS closed 5 years ago
Also, the first run of
from deeppavlov import configs, evaluate_model
evaluate_model(configs.kbqa.kbqa_rus, download=True)
results in RuntimeError
:
2019-06-18 21:05:29.52 INFO in 'deeppavlov.download'['download'] at line 116: Skipped http://files.deeppavlov.ai/deeppavlov_data/templates.pickle download because of matching hashes
2019-06-18 21:05:34.248 INFO in 'deeppavlov.download'['download'] at line 116: Skipped http://files.deeppavlov.ai/deeppavlov_data/wikidata_rus.tar.gz download because of matching hashes
2019-06-18 21:05:47.430 INFO in 'deeppavlov.download'['download'] at line 116: Skipped http://files.deeppavlov.ai/embeddings/ft_native_300_ru_wiki_lenta_nltk_word_tokenize/ft_native_300_ru_wiki_lenta_nltk_word_tokenize.bin download because of matching hashes
2019-06-18 21:05:47.444 INFO in 'deeppavlov.download'['download'] at line 116: Skipped http://files.deeppavlov.ai/deeppavlov_data/wiki_properties_id_to_name.pickle download because of matching hashes
2019-06-18 21:05:47.950 INFO in 'deeppavlov.download'['download'] at line 116: Skipped http://files.deeppavlov.ai/deeppavlov_data/inverted_index.pickle download because of matching hashes
2019-06-18 21:05:50.390 INFO in 'deeppavlov.download'['download'] at line 116: Skipped http://files.deeppavlov.ai/embeddings/lenta_lower_100.bin download because of matching hashes
2019-06-18 21:05:50.428 INFO in 'deeppavlov.download'['download'] at line 116: Skipped http://files.deeppavlov.ai/deeppavlov_data/kbqa_mix_lowercase.tar.gz download because of matching hashes
2019-06-18 21:05:50.444 INFO in 'deeppavlov.core.data.utils'['utils'] at line 63: Downloading from http://files.deeppavlov.ai/kbqa/test_set_with_answers.txt to F:\conda\.deeppavlov\downloads\wikidata_rus\test_set_with_answers.txt
6.94kB [00:00, 6.87MB/s]
2019-06-18 21:05:50.453 INFO in 'deeppavlov.core.data.utils'['utils'] at line 201: Extracting F:\conda\.deeppavlov\downloads\wikidata_rus\test_set_with_answers.txt archive into F:\conda\.deeppavlov\downloads\wikidata_rus
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-2-77ea99616bd6> in <module>
----> 1 evaluate_model(configs.kbqa.kbqa_rus, download=True)
F:\conda\envs\dp_kbqa\lib\site-packages\deeppavlov-0.3.1-py3.6.egg\deeppavlov\__init__.py in evaluate_model(config, download, recursive)
33
34 def evaluate_model(config: [str, Path, dict], download: bool = False, recursive: bool = False) -> dict:
---> 35 return train_evaluate_model_from_config(config, to_train=False, download=download, recursive=recursive)
36
37 except ImportError:
F:\conda\envs\dp_kbqa\lib\site-packages\deeppavlov-0.3.1-py3.6.egg\deeppavlov\core\commands\train.py in train_evaluate_model_from_config(config, iterator, to_train, evaluation_targets, to_validate, download, start_epoch_num, recursive)
90 if iterator is None:
91 try:
---> 92 data = read_data_by_config(config)
93 except ConfigError as e:
94 to_train = False
F:\conda\envs\dp_kbqa\lib\site-packages\deeppavlov-0.3.1-py3.6.egg\deeppavlov\core\commands\train.py in read_data_by_config(config)
56 data_path = expand_path(data_path)
57
---> 58 return reader.read(data_path, **reader_config)
59
60
F:\conda\envs\dp_kbqa\lib\site-packages\deeppavlov-0.3.1-py3.6.egg\deeppavlov\dataset_readers\kbqa_reader.py in read(self, data_path)
17 url = 'http://files.deeppavlov.ai/kbqa/test_set_with_answers.txt'
18 data_path.mkdir(exist_ok=True, parents=True)
---> 19 download_decompress(url, data_path)
20 dataset = {}
21
F:\conda\envs\dp_kbqa\lib\site-packages\deeppavlov-0.3.1-py3.6.egg\deeppavlov\core\data\utils.py in download_decompress(url, download_path, extract_paths)
210 zip_ref.extractall(extracted_path)
211 else:
--> 212 raise RuntimeError(f'Trying to extract an unknown type of archive {file_name}')
213
214 if not cache_dir:
RuntimeError: Trying to extract an unknown type of archive test_set_with_answers.txt
The second run is OK, when test_set_with_answers.txt
file is already downloaded.
I'm posting this error here, since these issues were introduced in the same PR #734.
Resolved in #886
https://github.com/deepmipt/DeepPavlov/blob/0214bd4ca2a676057d287a5011a20fb7ee2ddaeb/deeppavlov/configs/ner/ner_kb_rus.json#L2-L5