Passing custom features to TED policy

Is it possible to pass dense features from a custom featurizer to the TED policy?

Hi @kearnsw

Yes, in an end-to-end setting, TED should use the featurizers of your NLU pipeline, so if you create a custom featurizer and add it there, it should be used by TED.

Hi @j.mosig

Thanks for responding. Is there a way for me to inspect the model to ensure the features are being passed? For example, through the debug log.

I have to check that… But first, did you install Rasa from source?

I have both installed in different environments. I can change the source code to allow this, just wondering if there’s a way to use the existing TED policy or if I should raise an issue on GitHub.

inspect the model to ensure the features are being passed

Do I get this right that you want to see if the feature arrays seen by TED include the features of you component? I don’t think you can output this by default (e.g. -vv doesn’t print what featurizers are seen by TED). But If you run from code, you can always use a print or tf.print statement. The codebase has changed a lot recently, so you may need to look at different places, but you may start looking around here. Does this help?

Yes, I’d like to see which featurizers and features are used by TED. I had traced the code and it appeared that the features from each featurizer are accessed through a dictionary via a key for each featurizer name. I’ll go ahead and open a GitHub issue and submit a PR that includes this additional logging at the debug level.

1 Like