# Passing custom features to TED policy

**URL:** <https://forum.rasa.com/t/passing-custom-features-to-ted-policy/42676>\
**Category:** Rasa Open Source\
**Created:** [April 20, 2021, 10:01pm UTC](https://forum.rasa.com/t/passing-custom-features-to-ted-policy/42676 "2021-04-20T22:01:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kearnsw](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kearnsw/32/4838_2.png) [@kearnsw](https://forum.rasa.com/u/kearnsw)\
**Post date:** [April 20, 2021, 10:01pm UTC](https://forum.rasa.com/t/passing-custom-features-to-ted-policy/42676/1 "2021-04-20T22:01:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![j.mosig](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/j.mosig/32/3588_2.png) [@j.mosig](https://forum.rasa.com/u/j.mosig)\
**Post date:** [April 21, 2021, 10:16am UTC](https://forum.rasa.com/t/passing-custom-features-to-ted-policy/42676/2 "2021-04-21T10:16:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kearnsw](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kearnsw/32/4838_2.png) [@kearnsw](https://forum.rasa.com/u/kearnsw)\
**Post date:** [April 21, 2021, 6:42pm UTC](https://forum.rasa.com/t/passing-custom-features-to-ted-policy/42676/3 "2021-04-21T18:42:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![j.mosig](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/j.mosig/32/3588_2.png) [@j.mosig](https://forum.rasa.com/u/j.mosig)\
**Post date:** [April 26, 2021, 8:37am UTC](https://forum.rasa.com/t/passing-custom-features-to-ted-policy/42676/4 "2021-04-26T08:37:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kearnsw](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kearnsw/32/4838_2.png) [@kearnsw](https://forum.rasa.com/u/kearnsw)\
**Post date:** [April 27, 2021, 3:32am UTC](https://forum.rasa.com/t/passing-custom-features-to-ted-policy/42676/5 "2021-04-27T03:32:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![j.mosig](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/j.mosig/32/3588_2.png) [@j.mosig](https://forum.rasa.com/u/j.mosig)\
**Post date:** [April 29, 2021, 7:28am UTC](https://forum.rasa.com/t/passing-custom-features-to-ted-policy/42676/6 "2021-04-29T07:28:30Z")

</div>

> 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](https://github.com/RasaHQ/rasa/blob/3eee4130feede2bf29e65a48bfa04cc15b9d152c/rasa/core/featurizers/tracker_featurizers.py#L82). Does this help?

---

<div class="post-metadata">

**Author:** ![kearnsw](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kearnsw/32/4838_2.png) [@kearnsw](https://forum.rasa.com/u/kearnsw)\
**Post date:** [April 29, 2021, 10:42am UTC](https://forum.rasa.com/t/passing-custom-features-to-ted-policy/42676/7 "2021-04-29T10:42:36Z")

</div>

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.
