How to get the rasa trained model in protobuf format?

I would like to convert the rasa trained model into protobuf format or if possible save the trained models in protobuf format directly(during training). I need this for inferring the model in onnx.

Usually, TensorFlow supports a way to convert its model to protobuf format if we have .meta, .index, and .data-00000-of-00001; I have .index and .data-00000-of-00001 files, but I couldn’t find the .meta file(there is only metadata.json).

Please provide a solution for this problem

Below listed are the files present in the model.tar.gz

Rasa Version : 2.2.2

Rasa SDK Version : 2.2.0

Rasa X Version : None

Python Version : 3.8.3

Operating System : Ubuntu 18.04.2 LTS, Linux-5.4.0-59-generic-x86_64-with-glibc2.10

what is .meta file?

.meta file is a protocol buffer which saves the complete Tensorflow graph; i.e. all variables, operations, collections etc.

since we use custom keras model, we don’t save complete Tensorflow graph. We only persist training weights

Thanks for your reply.

I would like to convert the model to onnx for performance reasons. I need the files that contain the NN architecture code so that I can load this model and convert it to onnx. Can you please help me in locating these keras files in the git repo?

there is rasa/utils/tensorflow and 2 main algorithms in diet_classifier.py and ted_policy.py

1 Like

@sharanya were you able to convert model to TF format?