Cannot load custom component / custom IO channel by class name
See original GitHub issueI have a custom tokenizer and synonym mapper. It works fine on rasa core 0.14x and rasa nlu 0.15x.
I upgraded to rasa 1.0.8 and its not working anymore. It gives the followring error:
Exception: Failed to find component class for ‘custom_components.synonym.DukaEntitySynonymMapper’. Unknown component name. Check your configured pipeline and make sure the mentioned component is not misspelled. If you are creating your own component, make sure it is either listed as part of the
component_classes
inrasa.nlu.registry.py
or is a proper name of a class in a module.
Here is the pipeline that i’m using:
language: pt pipeline:
- name: “custom_components.tokenizer.DukaTokenizer”
- name: CRFEntityExtractor
- name: CountVectorsFeaturizer
- name: EmbeddingIntentClassifier
- name: “custom_components.synonym.DukaEntitySynonymMapper”
- dimensions:
- time
- number
- amount-of-money
- distance
- email locale: pt_BR name: DucklingHTTPExtractor timezone: “America/Bras\xEDlia” url: http://localhost:8000 policies:
- batch_size: 50 epochs: 200 max_training_samples: 300 name: KerasPolicy
- fallback_action_name: action_default_fallback name: FallbackPolicy
- max_history: 5 name: MemoizationPolicy
- name: FormPolicy
- name: MappingPolicy
I’ve already tried adding the custom component folder with PYTHONPATH in ~/.bashrc, as suggested in https://github.com/RasaHQ/rasa/issues/3673
export PYTHONPATH=“/home/bruno.roth/Documents/duka-data/nlu-data/custom_components”
But still no sucess.
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (13 by maintainers)
Top GitHub Comments
It worked!!
Thank you very much guys! Apparently everything is working correctly now.
I think you also have to source the bashrc for the changes to take affect on your system:
You can also just quickly test it by simply running the following in your command line:
Can try it and let me know if that works?