Rasa train cannot load model 'de'


I am having trouble training my NLU with language “de” model. I am getting error while training that “Model ‘de’ is not a linked spaCy model”. However spaCy info states “Models en_core_web_md, de_core_news_sm, de, en”. So, I am clueless what I am doing wrong here?

my config.yml:

language: de
  - name: SpacyNLP
  - name: SpacyTokenizer
  - name: RegexFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: char_wb
    max_featurizes: 10000
    max_ngram: 15
    min_ngram: 2
  - name: DucklingHTTPExtractor
      - time
      - duration
    locale: de_DE
    timezone: Europe/Berlin
    url: http://duckling:8000
  - name: DIETClassifier
    epochs: 20
    intent_tokenization_flag: true
    intent_split_symbol: "+"
  - name: EntitySynonymMapper
  - name: TEDPolicy
    batch_size: 50
    epochs: 20
    max_training_samples: 300
    max_history: 5
  - name: FallbackPolicy
    fallback_action_name: action_default_fallback
    nlu_threshold: 0.2
  - name: MemoizationPolicy
    max_history: 5
  - name: FormPolicy
  - name: MappingPolicy

Spacy info: ============================== Info about spaCy ==============================

spaCy version    2.2.3
Location         /Users/Theresa/anaconda3/lib/python3.6/site-packages/spacy
Platform         Darwin-19.3.0-x86_64-i386-64bit
Python version   3.6.2
Models           en_core_web_md, de_core_news_sm, de, en


rasa.nlu.model.InvalidModelError: Model 'de' is not a linked spaCy model.  Please download and/or link a spaCy model, e.g. by running:
python -m spacy download en_core_web_md
python -m spacy link en_core_web_md en

Training command:
rasa train --data data/carrots -c config.yml -d carrots/domain.yml --out models/carrots

hey @threxx, you are facing the above issue because you might not have downloaded the spacy german model or not have linked the spacy model. try running the below command and test it.

python -m spacy download de_core_news_sm
python -m spacy link de_core_news_sm de

Hey, I have already tried that and I tried it once again but I am still facing the same error. I will add the python validate output:

➜ python -m spacy validate
✔ Loaded compatibility table

====================== Installed models (spaCy v2.2.3) ======================
ℹ spaCy installation:

TYPE      NAME              MODEL             VERSION
package   en-core-web-md    en_core_web_md    2.2.5   ✔
package   de-core-news-sm   de_core_news_sm   2.2.5   ✔
package   de-core-news-md   de_core_news_md   2.2.5   ✔
link      en_core_web_md    en_core_web_md    2.2.5   ✔
link      de_core_news_md   de_core_news_md   2.2.5   ✔
link      de_core_news_sm   de_core_news_sm   2.2.5   ✔
link      de                de_core_news_sm   2.2.5   ✔
link      en                en_core_web_md    2.2.5   ✔

hey @threxx, can you try the below command and let me know the output:

python3 -m spacy validate

Thank you! I somehow have python and python3 installed (same version) but python3 did not have any models!! Thanks

@threxx, I hope the problem is solved :blush:

In case anyone else stumbles upon this. As of version 3.0.0 of spacy, the linking feature is deprecated. As a workaround the complete name of the model can be referenced in rasa’s config.yml language-property, e.g. :

language: de_core_news_sm

1 Like