If changed my config to remove two lines to see if the signal from the Regex featurizer was being overpowered by other featurizers I no longer felt I needed:
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
accidentally used to be before:
- name: CountVectorsFeaturizer
in the following config, so I removed the duplicate CountVectorsFeaturizer and the LexicalSyntacticFeaturizer. Now my model does not work and doesn’t reply in Rasa X (config and rasa_production container error pasted below:
CONFIG WITH ERROR
pipeline:
- name: ConveRTTokenizer
intent_tokenization_flag: true
intent_split_symbol: +
- name: ConveRTFeaturizer
model_url: >-
https://github.com/davidalami/ConveRT/releases/download/1.0/nocontext_tf_model.tar.gz
- name: RegexFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 10
num_transformer_layers: 4
transformer_size: 256
use_masked_language_model: false
drop_rate: 0.25
weight_sparsity: 0.7
batch_size:
- 32
- 128
embedding_dimension: 30
hidden_layer_sized:
text:
- 512
- 128
- name: DucklingHTTPExtractor
url: 'http://localhost:8000'
dimensions:
- time
- number
locale: en_US
timezone: US/Pacific
timeout: 3
- name: EntitySynonymMapper
- name: FallbackClassifier
threshold: 0.4
ambiguity_threshold: 0.1
policies:
- name: MemoizationPolicy
- name: TEDPolicy
featurizer:
- name: MaxHistoryTrackerFeaturizer
max_history: 5
state_featurizer:
- name: LabelTokenizerSingleStateFeaturizer
- name: FormPolicy
- name: RulePolicy
core_fallback_threshold: 0.3
core_fallback_action_name: action_default_fallback
error:
rasa-x_1 | [2021-03-13 22:57:19 +0000] - (sanic.access)[INFO][172.18.0.11:40260]: PUT http://35.212.149.17/api/users/me 204 0
rasa-production_1 | 2021-03-13 22:57:19 ERROR rasa.core.channels.rest - An exception occured while handling user message 'hi'.
rasa-production_1 | Traceback (most recent call last):
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/channels/rest.py", line 120, in receive
rasa-production_1 | await on_new_message(
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/channels/channel.py", line 85, in handler
rasa-production_1 | await app.agent.handle_message(*args, **kwargs)
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/agent.py", line 528, in handle_message
rasa-production_1 | return await processor.handle_message(message)
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 100, in handle_message
rasa-production_1 | await self._predict_and_execute_next_action(message.output_channel, tracker)
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 644, in _predict_and_execute_next_action
rasa-production_1 | action, prediction = self.predict_next_action(tracker)
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 371, in predict_next_action
rasa-production_1 | prediction = self._get_next_action_probabilities(tracker)
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 903, in _get_next_action_probabilities
rasa-production_1 | prediction = self.policy_ensemble.probabilities_using_best_policy(
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/policies/ensemble.py", line 795, in probabilities_using_best_policy
rasa-production_1 | winning_prediction = self._best_policy_prediction(tracker, domain, interpreter)
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/policies/ensemble.py", line 672, in _best_policy_prediction
rasa-production_1 | predictions = {
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/policies/ensemble.py", line 673, in <dictcomp>
rasa-production_1 | f"policy_{i}_{type(p).__name__}": self._get_prediction(
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/policies/ensemble.py", line 707, in _get_prediction
rasa-production_1 | prediction = policy.predict_action_probabilities(
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/core/policies/ted_policy.py", line 618, in predict_action_probabilities
rasa-production_1 | output = self.model.predict(model_data)
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/rasa/utils/tensorflow/models.py", line 343, in predict
rasa-production_1 | return self._predict_function(batch_in)
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 780, in __call__
rasa-production_1 | result = self._call(*args, **kwds)
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 807, in _call
rasa-production_1 | return self._stateless_fn(*args, **kwds) # pylint: disable=not-callable
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 2829, in __call__
rasa-production_1 | return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1843, in _filtered_call
rasa-production_1 | return self._call_flat(
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1923, in _call_flat
rasa-production_1 | return self._build_call_outputs(self._inference_function.call(
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 545, in call
rasa-production_1 | outputs = execute.execute(
rasa-production_1 | File "/opt/venv/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 59, in quick_execute
rasa-production_1 | tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
rasa-production_1 | tensorflow.python.framework.errors_impl.InvalidArgumentError: m (2) from index[1,0] out of bounds (>=2)
rasa-production_1 | [[{{node cond/then/_35/cond/action_name_sentence/SparseTensorDenseMatMul/SparseTensorDenseMatMul}}]] [Op:__inference_batch_predict_104241]
rasa-production_1 |
rasa-production_1 | Function call stack:
rasa-production_1 | batch_predict
rasa-production_1 |
ORIGINAL CONFIG:
language: en
pipeline:
- name: ConveRTTokenizer
intent_tokenization_flag: true
intent_split_symbol: +
- name: ConveRTFeaturizer
"model_url": https://github.com/davidalami/ConveRT/releases/download/1.0/nocontext_tf_model.tar.gz
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 10
num_transformer_layers: 4
transformer_size: 256
use_masked_language_model: false
drop_rate: 0.25
weight_sparsity: 0.7
batch_size:
- 32
- 128
embedding_dimension: 30
hidden_layer_sized:
text:
- 512
- 128
- name: DucklingHTTPExtractor
url: http://localhost:8000
dimensions:
- time
- number
locale: en_US
timezone: US/Pacific
timeout: 3
- name: EntitySynonymMapper
- name: FallbackClassifier
threshold: 0.4
ambiguity_threshold: 0.1
policies:
- name: MemoizationPolicy
- name: TEDPolicy
featurizer:
- name: MaxHistoryTrackerFeaturizer
max_history: 5
state_featurizer:
- name: LabelTokenizerSingleStateFeaturizer
- name: FormPolicy
- name: RulePolicy
core_fallback_threshold: 0.3
core_fallback_action_name: action_default_fallback
What could have gone wrong?