This is related to Enhacing Rasa NLU models with Custom Components but figured I would start a new thread just in case.
In our set up, we deploy Rasa as a container and then side load new models via a model server. The environment that we train new models is different than the package actually deployed since they require different things, meaning for simplicity, we deploy
package1 with Rasa in it but we train models using
package2 also contains extra code for our model server (we are hosting the test results of a the model on a website).
I recently created a custom component that uses some regex at the start of my pipeline to account for common spelling errors. I train the component in the
package2, uploaded it to the model server and the model was picked up and side-loaded in. However, because in my config file for the custom component, I needed to specify a path that was specific to
package2, the model deployed in
package1 can’t find it.
For instance, using the
SentimentAnalyzer in the custom components doc, if I put in a sub-directory, I need to load that component by its full path:
however, when it gets side loaded to
package1, I get an error that it can’t find
Since the component I built only contains Regex, the
re module is in both
package2. Is there a way to cache my custom component so that when it is trained, the class get’s stored in the model and the deployed package doesn’t need to know about it?