Custom component in Rasa 1.0


I’m using a custom component in my NLU pipeline which is located in a package “components” in the project directory. I recently upgraded to Rasa 1.0 and now training fails with the message “ModuleNotFoundError: No module named ‘components’”.

Apparently, when executing the class_from_module_path method, Rasa can’t find the component with my code. I have a class IntentInformation in a python module which is in a directory “components” and I reference it in the pipeline using this line: - name: “components.intent_information.IntentInformation”. Before the upgrade, this worked without problems. Are there any changes in Rasa 1.0 regarding custom components or am I missing anything?

Thanks and best regards!

Hi @alex38, follow this github issue as we try to figure out what’s going on here.

Thanks for the quick answer! Adding the path to my project to the PYTHONPATH variable works for me.

1 Like

It can also be done without updating PYTHONPATH, You can try : rasa.nlu.components.yourComponent