RASA's LexicalSyntacticFeaturizer can be used standalone?

33 Views Asked by At

Here is part of config.yml I used.

- name: WhitespaceTokenizer
- name: LexicalSyntacticFeaturizer
- name: DIETClassifier
  epochs: 100
  constrain_similarities: true

When do rasa train nlu, it gets an error below.

Traceback (most recent call last):
  File "/Users/abc/anaconda3/envs/rasa3/lib/python3.8/site-packages/rasa/engine/graph.py", line 487, in __call__
    output = self._fn(self._component, **run_kwargs)
  File "/Users/abc/anaconda3/envs/rasa3/lib/python3.8/site-packages/rasa/nlu/classifiers/diet_classifier.py", line 942, in train
    self.model.fit(
  File "/Users/abc/anaconda3/envs/rasa3/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/Users/abc/anaconda3/envs/rasa3/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 52, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: Graph execution error:

Detected at node 'GatherNd' defined at (most recent call last):
    ...
packages/rasa/utils/tensorflow/models.py", line 828, in _last_token
      return tf.gather_nd(x, indices)
Node: 'GatherNd'
indices[50] = [50, 34] does not index into param shape [64,34,256], node name: GatherNd
     [[{{node GatherNd}}]] [Op:__inference_train_function_49825]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/abc/anaconda3/envs/rasa3/bin/rasa", line 8, in <module>
    sys.exit(main())
...
    return func(*(_execute_task(a, cache) for a in args))
  File "/Users/abc/anaconda3/envs/rasa3/lib/python3.8/site-packages/rasa/engine/graph.py", line 494, in __call__
    raise GraphComponentException(
rasa.engine.exceptions.GraphComponentException: Error running graph component for node train_DIETClassifier2.

Does this mean LexicalSyntacticFeaturizer can't be used stand alone and needs to couple with other featurizers? When I add CountVectorsFeaturizer after it, rasa train nlu runs fine.

- name: WhitespaceTokenizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: DIETClassifier
  epochs: 100
  constrain_similarities: true
0

There are 0 best solutions below