Rasa NLU model trainer for supervised embeddings pipeline


So I’m trying to train my data using supervised embeddings pipeline.

Config.yml contains this:

language: “en”

pipeline: “supervised_embeddings

I’m running this on my notebook, but I keep on getting an error about tensorflow:

from rasa_nlu.training_data  import load_data
from rasa_nlu.config import RasaNLUModelConfig
from rasa_nlu.model import Trainer
from rasa_nlu import config

#Loading DataSet
train_data = load_data(my_data)

#Config Backend: Suervised embeddings
trainer = Trainer(config.load('drive/Colab Notebooks/config.yml'))


AttributeError Traceback (most recent call last) in () ----> 1 trainer.train(train_data)

1 frames /usr/local/lib/python3.6/dist-packages/rasa_nlu/classifiers/embedding_intent_classifier.py in train(self, training_data, cfg, **kwargs) 518 # set random seed 519 np.random.seed(self.random_seed) –> 520 tf.set_random_seed(self.random_seed) 521 522 self.a_in = tf.placeholder(tf.float32, (None, X.shape[-1]),

AttributeError: module ‘tensorflow’ has no attribute 'set_random_seed’

Any ideas on how to fix this?

Hi @Ghada, welcome back to the forum!

What are your Rasa and Tensorflow versions? We recently updated to Tensorflow 2.x.

Thank you! I have these versions:

import rasa
import tensorflow as tf
import rasa_nlu




Solution: I used !pip install rasa==1.1.4 instead of !pip install rasa since supervised_embeddings pipeline has been deprecated on the newer versions of RASA.

Ah yes! Glad you figured it out already. Sorry for not getting back to you right away.

1 Like