Hello,
I have installed Rasa X on a server using quick-install. I then add the Action Server using a DockerHub image.
I have language: en_core_web_lg
in my config.yml
.
When I test the bot in local mode on my personal computer, everything works fine.
But on the server, when I train the bot using Rasa X, it fails.
I check on the Kubernetes logs by using kubectl logs rasa-rasa-worker-xxx
and I find this:
2021-02-24 15:16:10 ERROR rasa.server - Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/utils/spacy_utils.py", line 49, in load_model
return spacy.load(spacy_model_name, disable=["parser"])
File "/opt/venv/lib/python3.8/site-packages/spacy/__init__.py", line 30, in load
return util.load_model(name, **overrides)
File "/opt/venv/lib/python3.8/site-packages/spacy/util.py", line 169, in load_model
raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'en_core_web_lg'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa/server.py", line 1020, in train
training_result = await train_async(**training_payload)
File "/opt/venv/lib/python3.8/site-packages/rasa/train.py", line 163, in train_async
return await _train_async_internal(
File "/opt/venv/lib/python3.8/site-packages/rasa/train.py", line 342, in _train_async_internal
await _do_training(
File "/opt/venv/lib/python3.8/site-packages/rasa/train.py", line 388, in _do_training
model_path = await _train_nlu_with_validated_data(
File "/opt/venv/lib/python3.8/site-packages/rasa/train.py", line 812, in _train_nlu_with_validated_data
await rasa.nlu.train(
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/train.py", line 97, in train
trainer = Trainer(
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/model.py", line 163, in __init__
self.pipeline = self._build_pipeline(cfg, component_builder)
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/model.py", line 174, in _build_pipeline
component = component_builder.create_component(component_cfg, cfg)
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/components.py", line 855, in create_component
component = registry.create_component_by_config(component_config, cfg)
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/registry.py", line 193, in create_component_by_config
return component_class.create(component_config, config)
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/utils/spacy_utils.py", line 81, in create
nlp = cls.load_model(spacy_model_name)
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/utils/spacy_utils.py", line 51, in load_model
raise InvalidModelError(
rasa.nlu.model.InvalidModelError: Model 'en_core_web_lg' 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
2021-02-24 15:16:10 ERROR rasa.server - An unexpected error occurred during training. Error: Model 'en_core_web_lg' 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
I am using SpaCy 3, so no need to use the link
command. I instead write language: en_core_web_lg
in config.yml
.
SpaCy 3 is installed on the server, and I downloaded en_core_web_lg
3.0.3.
I tried adding RUN python -m spacy download en_core_web_lg
in the Dockerfile, still doesn’t fix it.
However, if I write language: en
in config.yml
, it works.