When I add TED policy and train the core, after that while running the bot on the command line i didnβt get any response from the bot with the Error Logs:
2020-11-05 19:55:20 DEBUG rasa.core.processor - Received user message 'hi' with intent '{'id': -5976068340782558361, 'name': 'greetings.hello', 'confidence': 0.9986205101013184}' and entities '[]' 2020-11-05 19:55:20 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 4 events. 2020-11-05 19:55:20 DEBUG rasa.core.policies.memoization - Current tracker state [{'slots': {'form_mapping_counter': (1.0,)}}, {'user': {'intent': 'greetings.hello'}, 'slots': {'form_mapping_counter': (1.0,)}, 'prev_action': {'action_name': 'action_listen'}}] 2020-11-05 19:55:20 DEBUG rasa.core.policies.memoization - Launch DeLorean... 2020-11-05 19:55:20 DEBUG rasa.core.policies.memoization - Current tracker state [{'slots': {'form_mapping_counter': (1.0,)}}, {'user': {'intent': 'greetings.hello'}, 'slots': {'form_mapping_counter': (1.0,)}, 'prev_action': {'action_name': 'action_listen'}}] 2020-11-05 19:55:20 DEBUG rasa.core.policies.memoization - There is no memorised next action 2020-11-05 19:55:20 DEBUG rasa.core.lock_store - Deleted lock for conversation '6e38565c3a144a73b652be6c202c3d3b'. 2020-11-05 19:55:31 ERROR asyncio - Task exception was never retrieved future: <Task finished coro=<configure_app.<locals>.run_cmdline_io() done, defined at /usr/local/lib/python3.6/dist-packages/rasa/core/run.py:132> exception=TimeoutError()> Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/rasa/core/run.py", line 138, in run_cmdline_io sender_id=conversation_id, File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw return self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.6/dist-packages/rasa/core/channels/console.py", line 182, in record_messages async for response in bot_responses: File "/usr/local/lib/python3.6/dist-packages/rasa/core/channels/console.py", line 137, in send_message_receive_stream async for line in resp.content: File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw return self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.6/dist-packages/aiohttp/streams.py", line 39, in __anext__ rv = await self.read_func() File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw return self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.6/dist-packages/aiohttp/streams.py", line 328, in readline await self._wait('readline') File "/usr/lib/python3.6/asyncio/coroutines.py", line 129, in throw return self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.6/dist-packages/aiohttp/streams.py", line 296, in _wait await waiter File "/usr/local/lib/python3.6/dist-packages/aiohttp/helpers.py", line 596, in __exit__ raise asyncio.TimeoutError from None concurrent.futures._base.TimeoutError Transport closed @ ('127.0.0.1', 41170) and exception experienced during error handling ^CTraceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/code/ai/scripts/tc_cmd.py", line 87, in <module> subprocess.Popen(command, shell=True).communicate() File "/usr/lib/python3.6/subprocess.py", line 855, in communicate self.wait() File "/usr/lib/python3.6/subprocess.py", line 1477, in wait (pid, sts) = self._try_wait(0) File "/usr/lib/python3.6/subprocess.py", line 1424, in _try_wait (pid, sts) = os.waitpid(self.pid, wait_flags) KeyboardInterrupt 2020-11-05 19:55:54 ERROR asyncio - Task exception was never retrieved future: <Task finished coro=<RestInput.on_message_wrapper() done, defined at /usr/local/lib/python3.6/dist-packages/rasa/core/channels/rest.py:33> exception=NotFittedError('Vocabulary not fitted or provided',) created at /usr/local/lib/python3.6/dist-packages/rasa/core/channels/rest.py:73> source_traceback: Object created at (most recent call last): File "/usr/local/bin/rasa", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.6/dist-packages/rasa/__main__.py", line 116, in main cmdline_arguments.func(cmdline_arguments) File "/usr/local/lib/python3.6/dist-packages/rasa/cli/shell.py", line 123, in shell rasa.cli.run.run(args) File "/usr/local/lib/python3.6/dist-packages/rasa/cli/run.py", line 121, in run rasa.run(**vars(args)) File "/usr/local/lib/python3.6/dist-packages/rasa/run.py", line 58, in run **kwargs, File "/usr/local/lib/python3.6/dist-packages/rasa/core/run.py", line 226, in serve_application workers=number_of_workers, File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 1167, in run serve(**server_settings) File "/usr/local/lib/python3.6/dist-packages/sanic/server.py", line 920, in serve loop.run_forever() File "/usr/lib/python3.6/asyncio/coroutines.py", line 126, in send return self.gen.send(value) File "/usr/local/lib/python3.6/dist-packages/spf/framework.py", line 554, in _handle_request stream_callback) File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/usr/local/lib/python3.6/dist-packages/sanic/app.py", line 1036, in handle_request await stream_callback(response) File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/usr/local/lib/python3.6/dist-packages/sanic/server.py", line 532, in stream_response self.request.version, keep_alive, self.keep_alive_timeout File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/usr/local/lib/python3.6/dist-packages/sanic/response.py", line 98, in stream await self.streaming_fn(self) File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/usr/local/lib/python3.6/dist-packages/rasa/core/channels/rest.py", line 73, in stream on_new_message, text, q, sender_id, input_channel, metadata Traceback (most recent call last): File "/usr/lib/python3.6/asyncio/coroutines.py", line 126, in send return self.gen.send(value) File "/usr/local/lib/python3.6/dist-packages/rasa/core/channels/rest.py", line 47, in on_message_wrapper await on_new_message(message) File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/usr/local/lib/python3.6/dist-packages/rasa/core/channels/channel.py", line 84, in handler await app.agent.handle_message(*args, **kwargs) File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/usr/local/lib/python3.6/dist-packages/rasa/core/agent.py", line 526, in handle_message return await processor.handle_message(message) File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/usr/local/lib/python3.6/dist-packages/rasa/core/processor.py", line 98, in handle_message await self._predict_and_execute_next_action(message.output_channel, tracker) File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__ return self.gen.send(None) File "/usr/local/lib/python3.6/dist-packages/rasa/core/processor.py", line 563, in _predict_and_execute_next_action action, policy, confidence = self.predict_next_action(tracker) File "/usr/local/lib/python3.6/dist-packages/rasa/core/processor.py", line 285, in predict_next_action action_confidences, policy = self._get_next_action_probabilities(tracker) File "/usr/local/lib/python3.6/dist-packages/rasa/core/processor.py", line 829, in _get_next_action_probabilities tracker, self.domain, self.interpreter File "/usr/local/lib/python3.6/dist-packages/rasa/core/policies/ensemble.py", line 672, in probabilities_using_best_policy tracker, domain, interpreter File "/usr/local/lib/python3.6/dist-packages/rasa/core/policies/ensemble.py", line 562, in _best_policy_prediction for i, p in enumerate(self.policies) File "/usr/local/lib/python3.6/dist-packages/rasa/core/policies/ensemble.py", line 562, in <dictcomp> for i, p in enumerate(self.policies) File "/usr/local/lib/python3.6/dist-packages/rasa/core/policies/ensemble.py", line 593, in _get_prediction tracker, domain, interpreter File "/usr/local/lib/python3.6/dist-packages/rasa/core/policies/ted_policy.py", line 385, in predict_action_probabilities [tracker], domain, interpreter File "/usr/local/lib/python3.6/dist-packages/rasa/core/featurizers/tracker_featurizers.py", line 180, in create_state_features return self._featurize_states(trackers_as_states, interpreter) File "/usr/local/lib/python3.6/dist-packages/rasa/core/featurizers/tracker_featurizers.py", line 73, in _featurize_states for tracker_states in trackers_as_states File "/usr/local/lib/python3.6/dist-packages/rasa/core/featurizers/tracker_featurizers.py", line 73, in <listcomp> for tracker_states in trackers_as_states File "/usr/local/lib/python3.6/dist-packages/rasa/core/featurizers/tracker_featurizers.py", line 71, in <listcomp> for state in tracker_states File "/usr/local/lib/python3.6/dist-packages/rasa/core/featurizers/single_state_featurizer.py", line 201, in encode_state self._extract_state_features(sub_state, interpreter, sparse=True) File "/usr/local/lib/python3.6/dist-packages/rasa/core/featurizers/single_state_featurizer.py", line 169, in _extract_state_features parsed_message = interpreter.featurize_message(message) File "/usr/local/lib/python3.6/dist-packages/rasa/core/interpreter.py", line 158, in featurize_message result = self.interpreter.featurize_message(message) File "/usr/local/lib/python3.6/dist-packages/rasa/nlu/model.py", line 415, in featurize_message component.process(message, **self.context) File "/usr/local/lib/python3.6/dist-packages/rasa/nlu/featurizers/sparse_featurizer/count_vectors_featurizer.py", line 562, in process attribute, [message_tokens] File "/usr/local/lib/python3.6/dist-packages/rasa/nlu/featurizers/sparse_featurizer/count_vectors_featurizer.py", line 438, in _create_features seq_vec = self.vectorizers[attribute].transform(tokens) File "/usr/local/lib/python3.6/dist-packages/sklearn/feature_extraction/text.py", line 1267, in transform self._check_vocabulary() File "/usr/local/lib/python3.6/dist-packages/sklearn/feature_extraction/text.py", line 490, in _check_vocabulary raise NotFittedError("Vocabulary not fitted or provided") sklearn.exceptions.NotFittedError: Vocabulary not fitted or provided Makefile:50: recipe for target 'run-bot-shell' failed
Here is the Config File:
language: en
pipeline:
- name: WhitespaceTokenizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
token_pattern: (?u)\b\w+\b
- name: RegexEntityExtractor
# text will be processed with case insensitive as default
"case_sensitive": False
# use lookup tables to extract entities
"use_lookup_tables": True
# use regexes to extract entities
"use_regexes": True
- name: DucklingHTTPExtractor
url: http://duckling:7000
dimensions:
- sys_time
- sys_day
- sys_month
- sys_year
- phone-number
- number
- amount-of-money
- distance
- duration
- volume
- ordinal
- temperature
- email
- url
- time
- name: DIETClassifier
epochs: 15
- name: FallbackClassifier
threshold: 0.6
ambiguity_threshold: 0.1
policies:
- name: AugmentedMemoizationPolicy
- name: TEDPolicy
epochs: 100
- name: RulePolicy
core_fallback_threshold: 0.4
core_fallback_action_name: "action_default_fallback"
@Tanja seen you providing solution to almost the similar problem on Git, if you please may help. Thanks