jadore801120/attention-is-all-you-need-pytorch

Error time to execute 'python preprocess.py -lang_src de -lang_trg en -share_vocab -save_data m30k_deen_shr.pkl' command

evilczy opened this issue · 3 comments

Namespace(lang_src='de', lang_trg='en', save_data='m30k_deen_shr_new.pkl', data_src=None, data_trg=None, max_len=100, min_word_count=3, keep_case=False, share_vocab=True)
Traceback (most recent call last):
File "(my location)\attention-is-all-you-need-pytorch-master\preprocess.py", line 340, in
main_wo_bpe()
File "(my location)\attention-is-all-you-need-pytorch-master\preprocess.py", line 275, in main_wo_bpe
src_lang_model = spacy.load(opt.lang_src)
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\D\Anaconda3\envs\pytorch\Lib\site-packages\spacy_init_.py", line 51, in load
return util.load_model(
^^^^^^^^^^^^^^^^
File "D:\D\Anaconda3\envs\pytorch\Lib\site-packages\spacy\util.py", line 471, in load_model
raise IOError(Errors.E941.format(name=name, full=OLD_MODEL_SHORTCUTS[name])) # type: ignore[index]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [E941] Can't find model 'de'. It looks like you're trying to load a model from a shortcut, which is obsolete as of spaCy v3.0. To load the model, use its full name instead:

nlp = spacy.load("de_core_news_sm")

For more details on the available models, see the models directory: https://spacy.io/models and if you want to create a blank model, use spacy.blank: nlp = spacy.blank("de")

Hi,I also face on this problem 。Did you solve it?

I don't solve this problem. But I foud another one. It can run but when I rewrite the transforemr class I face another problem. Could you leave me an email, we can talk about it.

我看你是杭州电子科技的,我们可以添加qq:2863611376