I have the same problem. When I tried devanshamin’s solution, I get the following error when training my model:
Traceback (most recent call last):
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/eager/context.py”, line 1897, in execution_mode
yield
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/data/ops/iterator_ops.py”, line 659, in _next_internal
output_shapes=self._flat_output_shapes)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_dataset_ops.py”, line 2479, in iterator_get_next_sync
_ops.raise_from_not_ok_status(e, name)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py”, line 6606, in raise_from_not_ok_status
six.raise_from(core._status_to_exception(e.code, message), None)
File “”, line 3, in raise_from
tensorflow.python.framework.errors_impl.UnknownError: AttributeError: ‘int’ object has no attribute ‘ndim’
Traceback (most recent call last):
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py”, line 236, in call
ret = func(*args)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/data/ops/dataset_ops.py”, line 789, in generator_py_func
values = next(generator_state.get_iterator(iterator_id))
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/utils/tensorflow/model_data.py”, line 412, in _gen_batch
yield self.prepare_batch(data, start, end)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/utils/tensorflow/model_data.py”, line 270, in prepare_batch
batch_data.append(self._pad_dense_data(_data))
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/utils/tensorflow/model_data.py”, line 544, in _pad_dense_data
if array_of_dense[0].ndim < 2:
AttributeError: ‘int’ object has no attribute ‘ndim’
[[{{node PyFunc}}]] [Op:IteratorGetNextSync]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/opt/anaconda3/envs/rasa_sae/bin/rasa”, line 8, in
sys.exit(main())
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/main.py”, line 92, in main
cmdline_arguments.func(cmdline_arguments)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/cli/train.py”, line 76, in train
additional_arguments=extract_additional_arguments(args),
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/train.py”, line 50, in train
additional_arguments=additional_arguments,
File “uvloop/loop.pyx”, line 1456, in uvloop.loop.Loop.run_until_complete
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/train.py”, line 101, in train_async
additional_arguments,
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/train.py”, line 188, in _train_async_internal
additional_arguments=additional_arguments,
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/train.py”, line 245, in _do_training
persist_nlu_training_data=persist_nlu_training_data,
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/train.py”, line 482, in _train_nlu_with_validated_data
persist_nlu_training_data=persist_nlu_training_data,
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/nlu/train.py”, line 90, in train
interpreter = trainer.train(training_data, **kwargs)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/nlu/model.py”, line 191, in train
updates = component.train(working_data, self.config, **context)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/nlu/classifiers/diet_classifier.py”, line 723, in train
self.component_config[BATCH_STRATEGY],
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/utils/tensorflow/models.py”, line 131, in fit
) = self._get_tf_train_functions(eager, model_data, batch_strategy)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/utils/tensorflow/models.py”, line 348, in _get_tf_train_functions
train_dataset_function, self.train_on_batch, eager, “train”
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/utils/tensorflow/models.py”, line 330, in _get_tf_call_model_function
tf_call_model_function(next(iter(init_dataset)))
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/data/ops/iterator_ops.py”, line 630, in next
return self.next()
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/data/ops/iterator_ops.py”, line 674, in next
return self._next_internal()
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/data/ops/iterator_ops.py”, line 665, in _next_internal
return structure.from_compatible_tensor_list(self._element_spec, ret)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/contextlib.py”, line 130, in exit
self.gen.throw(type, value, traceback)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/eager/context.py”, line 1900, in execution_mode
executor_new.wait()
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/eager/executor.py”, line 67, in wait
pywrap_tensorflow.TFE_ExecutorWaitForAllPendingNodes(self._handle)
tensorflow.python.framework.errors_impl.UnknownError: AttributeError: ‘int’ object has no attribute ‘ndim’
Traceback (most recent call last):
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py”, line 236, in call
ret = func(*args)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/tensorflow_core/python/data/ops/dataset_ops.py”, line 789, in generator_py_func
values = next(generator_state.get_iterator(iterator_id))
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/utils/tensorflow/model_data.py”, line 412, in _gen_batch
yield self.prepare_batch(data, start, end)
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/utils/tensorflow/model_data.py”, line 270, in prepare_batch
batch_data.append(self._pad_dense_data(_data))
File “/opt/anaconda3/envs/rasa_sae/lib/python3.7/site-packages/rasa/utils/tensorflow/model_data.py”, line 544, in _pad_dense_data
if array_of_dense[0].ndim < 2:
AttributeError: ‘int’ object has no attribute ‘ndim’
[[{{node PyFunc}}]]
Also, no model gets created.