How to Configure Spacy in rasa-x?


I have installed rasa-x in a GCP VM and I’m trying to run a rasa 2.0 bot pulled from my github repo, I’m getting the following error

### Training failed

An unexpected error occurred during training. Error: Please confirm that es_core_news_md is an available spaCy model. You need to download one upfront. For example:
python -m spacy download en_core_web_md
More informaton can be found on

I ran

pip install spacy

python -m spacy download es_core_news_md on the VM but I’m getting the same error when trying to train in rasa-x,

any ideas?

@jeacunag can you share the method you have used to install rasa x on GCP VM? and what version of Rasa X?

@nik202 Yes, I followed this to the letter Installing and Deploying Rasa X (Using Rasa Ephemeral Installer) - YouTube

@jeacunag and you able to talk to bot?

@jeacunag can you share the config.yml file with me?

The bot works fine in local mode in my computer, but not in rasa-x, here’s my config file

language: es
#pipeline recomendado para espanol en la documentacion
  - name: SpacyNLP
    model: es_core_news_md
  - name: SpacyTokenizer
  - name: SpacyFeaturizer
  - name: RegexFeaturizer
    "case_sensitive": False
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DucklingEntityExtractor
    # url of the running duckling server
    url: "http://localhost:8000"
    # dimensions to extract
    dimensions: ["time", "number"]
    # allows you to configure the locale, by default the language is
    # used
    # if not set the default timezone of Duckling is going to be used
    # needed to calculate dates from relative expressions like "tomorrow"
    timezone: "America/Bogota" #acepta formato IANA timezone
    # Timeout for receiving response from http url of the running duckling server
    # if not set the default timeout of duckling http url is set to 3 seconds.
    #timeout : 3
  - name: DIETClassifier #detecta nombres
    epochs: 100
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 100

@jeacunag can you please share the screenshot of the error after the command or traceback?

Here it is

Alright, means he is not getting the spacy model for training purpose.

That is clear to me, I already installed the model on the VM but the error message remains, do you know anything else I can try?

@jeacunag can you manually download the model (es_core_news_md) and create the folder in your project directory and then push and train the model?

Ref: explosion/spacy-models es_core_news_md-3.0.0 on GitHub

what name should the folder have?

@jeacunag can you share the values.yml file, please? It’s hard for me to explain as this process is very complex and not much mentioned on the rasa doc. I’m honestly want to help you with this. @jeacunag do you have any requirenments.txt file also? @jeacunag how are you installing the action server?

Always mention me with tag

values.yml is the same as in the instructional video, I don’t have requirements.txt in the repo, this version of my bot has no action server, I have another newer version with the action server but I’m trying to solve the spacy problem first, so the action server is not relevant for now. As you see I have a duckling server too. Maybe you can walk me through an example which just uses the sapcy pipeline first?

try this install command please:

python -m spacy download es_core_news_sm

Hope you are able to install, the finger cross.:crossed_fingers:

that’s no the issue, I already installed es_core_news_md successfully on the VM

@jeacunag then? as per your mean issue it’s the issue or I am missing something?

OR you only want to install es_core_news_md ?

Please mention me with @ nik202 for fast response. Thanks.

The issue is the model is already installed but rasa-x keeps showing the error message