rasa
rasa copied to clipboard
Issue with Spacy component with e2e storied
Rasa Open Source version
3.0
Rasa SDK version
No response
Rasa X version
No response
Python version
3.9
What operating system are you using?
Windows
What happened?
Hello, I am using Rasa 3.0. I am trying to build a Rasa project with Spacy component in my pipeline, it is working fine in "normal" case, but when I try to train it with an end-to-end story, it is throwing "raise GraphSchemaValidationException( rasa.engine.exceptions.GraphSchemaValidationException: Your model uses a component 'SpacyNLP' which needs the param 'model' to be provided to its method 'process'. Please make sure that you registered your component correctly and that your model configuration is valid. See https://rasa.com/docs/rasa/custom-graph-components for more information.". I have provided the model and installed it. My config is:
-
The config recipe.
recipe: default.v1
-
Configuration for Rasa NLU.
language: bg
pipeline:
-
No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
-
If you'd like to customize it, uncomment and adjust the pipeline.
-
See https://rasa.com/docs/rasa/tuning-your-model for more information.
- name: "SpacyNLP"
- language model to load
model: "bg_pipeline"
case_sensitive: False
-
name: SpacyTokenizer
-
name: SpacyEntityExtractor
-
name: SpacyFeaturizer
pooling: mean
-
name: RegexFeaturizer
-
name: LexicalSyntacticFeaturizer
-
name: CountVectorsFeaturizer
-
name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
-
name: EntitySynonymMapper
-
name: ResponseSelector
epochs: 100
- name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
-
Configuration for Rasa Core.
policies:
-
No configuration for policies was provided. The following default policies were used to train your model.
-
If you'd like to customize them, uncomment and adjust the policies.
-
See https://rasa.com/docs/rasa/policies for more information.
-
- name: MemoizationPolicy
-
- name: RulePolicy
-
- name: UnexpecTEDIntentPolicy
-
max_history: 5
-
epochs: 100
-
- name: TEDPolicy
-
max_history: 5
-
epochs: 100
-
constrain_similarities: true
It is working with a normal story, the issue appears only with an end-to-end story. Please advice
Command / Request
No response
Relevant log output
No response
Defnition of Done
- [ ] Determine if the issue is a more general issue of the graph architecture or only specific to e2e
If it's e2e, then put this on deprio on the research board.
Exalate commented:
sara-tagger commented:
Thanks for the issue, @koernerfelicia will get back to you about it soon!
You may find help in the docs and the forum, too
Exalate commented:
koernerfelicia commented:
Can confirm this. To reproduce on examples/e2ebot:
use config:
recipe: default.v1 language: en pipeline:
- name: "SpacyNLP" model: "en_core_web_md" case_sensitive: False
- name: SpacyTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer analyzer: char_wb min_ngram: 1 max_ngram: 4
- name: SpacyEntityExtractor
- name: DIETClassifier epochs: 200 policies:
- name: TEDPolicy epochs: 200
error message:
rasa.engine.exceptions.GraphSchemaValidationException: Your model uses a component 'SpacyNLP' which needs the param 'model' to be provided to its method 'process'. Please make sure that you registered your component correctly and and that your model configuration is valid.See https://rasa.com/docs/rasa/custom-graph-components for more information.
Exalate commented:
koernerfelicia commented:
Training seems fine if you comment out the text from the stories like so:
....
- story: accepts suggestion, indirectly steps:
- intent: greet
- action: utter_greet
- intent: search_restaurant
- action: utter_suggest_cuisine
-
- user: "I can always go for sushi"
-
- action: utter_search_restaurants
- story: rejects suggestion, indirectly steps:
- intent: search_restaurant
- action: utter_suggest_cuisine
-
- user: "I had that yesterday"
-
- action: utter_suggest_cuisine
Exalate commented:
CharlesSQ commented:
Training seems fine if you comment out the text from the stories like so:
....
- story: accepts suggestion, indirectly steps:
- intent: greet
- action: utter_greet
- intent: search_restaurant
- action: utter_suggest_cuisine
- user: "I can always go for sushi"
- action: utter_search_restaurants
- story: rejects suggestion, indirectly steps:
- intent: search_restaurant
- action: utter_suggest_cuisine
- user: "I had that yesterday"
- action: utter_suggest_cuisine
Hello, I'm having the same issue but I need to use end-to-end stories because that's the main reason I'm moving to rasa 3
Exalate commented:
koernerfelicia commented:
@CharlesSQ thanks for the input. That comment was just intended to support those who will investigate the bug, it's definitely not a fix or workaround! It's been routed to the relevant teams, and we'll be working on a fix once it's been triaged
Exalate commented:
rgstephens commented:
I think this issue isn't confined to e2e. I was able to duplicate this issue by doing:
rasa init- Add
SpacyEntityExtractorto the pipeline rasa train
@koaning, have you used Spacy with 3.0?
Exalate commented:
koaning commented:
@rgstephens could you share the full config.yml file? I'm assuming that you've added a SpacyNLP object to your pipeline in order to get the SpacyEntityExtractor to work.
I haven't started a new project with Rasa using spaCy, but the CI passed since we upgraded ... so this is a bit strange.
Exalate commented:
koaning commented:
I was just able to run pipelines just fine with the spaCy tokenizer and featurizer. I did hit a minor developer experience bug, explained here: https://github.com/RasaHQ/rasa/issues/10814.
Exalate commented:
koaning commented:
To confirm, this was the pipeline that I tried on rasa init. It trained just fine.
pipeline:
* name: SpacyNLP
model: en_core_web_md
* name: SpacyTokenizer
* name: SpacyFeaturizer
* name: RegexFeaturizer
* name: LexicalSyntacticFeaturizer
* name: CountVectorsFeaturizer
* name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
* name: DIETClassifier
epochs: 100
* name: EntitySynonymMapper
* name: ResponseSelector
epochs: 100
* name: SpacyEntityExtractor
* name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
These were my version numbers.
Rasa Version : 3.0.6 Minimum Compatible Version: 3.0.0 Rasa SDK Version : 3.0.4 Rasa X Version : None Python Version : 3.8.12 Operating System : Linux-5.13.0-1012-gcp-x86_64-with-glibc2.29 Python Path : /home/gitpod/.pyenv/versions/3.8.12/bin/python
Exalate commented:
rgstephens commented:
I forgot to add SpacyNLP. When someone looks at this issue, it would be nice to improve the error message.
- name: SpacyNLP model: "en_core_web_md"
With end-to-end learning the issue still exists.
Did anyone find a solution for this bug?
➤ Maxime Verger commented:
:bulb: Heads up! We're moving issues to Jira: https://rasa-open-source.atlassian.net/browse/OSS.
From now on, this Jira board is the place where you can browse (without an account) and create issues (you'll need a free Jira account for that). This GitHub issue has already been migrated to Jira and will be closed on January 9th, 2023. Do not forget to subscribe to the corresponding Jira issue!
:arrow_right: More information in the forum: https://forum.rasa.com/t/migration-of-rasa-oss-issues-to-jira/56569.