Issue while running train_online.py

Hello People ,

I am trying to execute train_online.py for my chatbot POC.

However it is failing due to some issue. Please help. I will attach supporting files.

Please see below.actions.py (647 Bytes) train_online.py (1.3 KB) helpdesk_domain.yml (949 Bytes) nlu_model.py (784 Bytes) train_online.py (1.3 KB)

File “train_online.py”, line 39, in run_helpdesk_online(ConsoleInputChannel(), nlu_interpreter) File “train_online.py”, line 31, in run_helpdesk_online max_training_samples=300) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\agent.py”, line 177, in train_online trainer.train(filename, self.interpreter, input_channel, **kwargs) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\policies\online_policy_trainer.py”, line 52, in train input_channel) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\policies\online_policy_trainer.py”, line 67, in run_online_training input_channel if input_channel else ConsoleInputChannel()) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\agent.py”, line 126, in handle_channel processor.handle_channel(input_channel) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\processor.py”, line 60, in handle_channel input_channel.start_sync_listening(self.handle_message) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\channels\console.py”, line 52, in start_sync_listening self._record_messages(message_handler) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\channels\console.py”, line 45, in _record_messages self.sender_id)) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\processor.py”, line 83, in handle_message self._predict_and_execute_next_action(message, tracker) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\processor.py”, line 258, in _predict_and_execute_next_action action = self._get_next_action(tracker) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\processor.py”, line 399, in _get_next_action idx = self.policy_ensemble.predict_next_action(tracker, self.domain) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\policies\ensemble.py”, line 66, in predict_next_action probabilities = self.probabilities_using_best_policy(tracker, domain) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\policies\online_policy_trainer.py”, line 92, in probabilities_using_best_policy tracker, domain) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\policies\ensemble.py”, line 153, in probabilities_using_best_policy probabilities = p.predict_action_probabilities(tracker, domain) File “C:\Temp\Python\Python37\lib\site-packages\rasa_core\policies\keras_policy.py”, line 59, in predict_action_probabilities y_pred = self.model.predict(x, batch_size=1) File “C:\Temp\Python\Python37\lib\site-packages\keras\engine\training.py”, line 1456, in predict self._make_predict_function() File “C:\Temp\Python\Python37\lib\site-packages\keras\engine\training.py”, line 378, in _make_predict_function **kwargs) File “C:\Temp\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py”, line 3009, in function **kwargs) File “C:\Temp\Python\Python37\lib\site-packages\tensorflow_core\python\keras\backend.py”, line 3769, in function return GraphExecutionFunction(inputs, outputs, updates=updates, **kwargs) File “C:\Temp\Python\Python37\lib\site-packages\tensorflow_core\python\keras\backend.py”, line 3421, in init with ops.control_dependencies([self.outputs[0]]): File “C:\Temp\Python\Python37\lib\site-packages\tensorflow_core\python\framework\ops.py”, line 5159, in control_dependencies return get_default_graph().control_dependencies(control_inputs) File “C:\Temp\Python\Python37\lib\site-packages\tensorflow_core\python\framework\ops.py”, line 4583, in control_dependencies c = self.as_graph_element© File “C:\Temp\Python\Python37\lib\site-packages\tensorflow_core\python\framework\ops.py”, line 3505, in as_graph_element return self._as_graph_element_locked(obj, allow_tensor, allow_operation) File “C:\Temp\Python\Python37\lib\site-packages\tensorflow_core\python\framework\ops.py”, line 3584, in _as_graph_element_locked raise ValueError(“Tensor %s is not an element of this graph.” % obj) ValueError: Tensor Tensor(“activation_1/Softmax:0”, shape=(None, 6), dtype=float32) is not an element of this graph.

Hey @Aditya07 where did you get this script from? And what version of Rasa are you on?

Hello @akelad , i got it from a github repository(it was referenced in YT video). rasa is latest version

This script is extremely old and using very outdated rasa versions. I would suggest using our CLI instead: Command Line Interface

Hello @akelad , Kindly suggest some good resources if i want to code all this out using jupyter notebook.

I will use RASA docs but need some reference as to where to check it