Rasa2.0.0rc2 - No configuration file was provided to the TrainingDataImporter

Hello!

I am creating a chatbot with rasa 2.0.0rc2 with my own data.

The data was originally in markdown format, which I converted to .yml format using “rasa data convert” command and manually, both.

I figured the ConveRTTokenizer was discontinued so I used WhitespaceTokenizer in config.yml.

On training the bot with my own data on I get a warning:

You either need to add a response phrase or correct the intent for this example in your training data. If you intend to use Response Selector in the pipeline, the training may fail.

Nevertheless, the NLU and Core trains and the models are saved.

I started rasa shell to have a conversation with the chatbot. On sending a message to the chatbot I get the following error:

ERROR** asyncio - Task exception was never retrieved

future: <Task finished coro=<RestInput.on_message_wrapper() done, defined at /Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/core/channels/rest.py:33> exception=IndexError('list index out of range')>

The traceback is:

File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/core/channels/rest.py”, line 47, in on_message_wrapper await on_new_message(message) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/core/channels/channel.py”, line 84, in handler await app.agent.handle_message(*args, **kwargs) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/core/agent.py”, line 518, in handle_message return await processor.handle_message(message) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/core/processor.py”, line 83, in handle_message tracker = await self.log_message(message, should_save_tracker=False) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/core/processor.py”, line 236, in log_message await self._handle_message_with_tracker(message, tracker) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/core/processor.py”, line 499, in _handle_message_with_tracker parse_data = await self.parse_message(message, tracker) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/core/processor.py”, line 478, in parse_message text, message.message_id, tracker, metadata=message.metadata File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/core/interpreter.py”, line 145, in parse result = self.interpreter.parse(text) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/nlu/model.py”, line 400, in parse component.process(message, **self.context) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/nlu/selectors/response_selector.py”, line 382, in process self._resolve_intent_response_key(top_label) or top_label[INTENT_NAME_KEY] File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/nlu/selectors/response_selector.py”, line 363, in _resolve_intent_response_key search_key = util.template_key_to_intent_response_key(key) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/shared/nlu/training_data/util.py”, line 145, in template_key_to_intent_response_key print(“HERE=======>”, template_key.split(UTTER_PREFIX)[1]) IndexError: list index out of range

Then I went on to test the rasa components using the command “rasa test nlu/core”. The results are as follows:

  • rasa test nlu gives error. The traceback is: File “/Users/nutxa36/.pyenv/versions/rasa2.0.0rc2/bin/rasa”, line 8, in sys.exit(main()) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/main.py”, line 113, in main cmdline_arguments.func(cmdline_arguments) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/cli/test.py”, line 159, in run_nlu_test test_nlu(model_path, nlu_data, output, vars(args)) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/test.py”, line 183, in test_nlu run_evaluation(nlu_data, nlu_model, output_directory=output_directory, **kwargs) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/nlu/test.py”, line 1489, in run_evaluation interpreter, test_data File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/nlu/test.py”, line 1310, in get_eval_data result = interpreter.parse(example.get(TEXT), only_output_properties=False) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/nlu/model.py”, line 400, in parse component.process(message, **self.context) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/nlu/selectors/response_selector.py”, line 382, in process self._resolve_intent_response_key(top_label) or top_label[INTENT_NAME_KEY] File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/nlu/selectors/response_selector.py”, line 363, in _resolve_intent_response_key search_key = util.template_key_to_intent_response_key(key) File “/Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/shared/nlu/training_data/util.py”, line 145, in template_key_to_intent_response_key print(“HERE=======>”, template_key.split(UTTER_PREFIX)[1]) IndexError: list index out of range

  • rasa test core runs successfully

I then went on to validate my data with the command "rasa data validate -vv. The debugging log is as follows:

2020-10-01 12:51:24 DEBUG rasa.shared.nlu.training_data.loading - Training data format of ‘data/nlu.yml’ is ‘rasa_yml’.

2020-10-01 12:51:24 DEBUG rasa.shared.nlu.training_data.loading - Training data format of ‘data/responses.yml’ is ‘rasa_yml’.

2020-10-01 12:51:24 DEBUG rasa.shared.nlu.training_data.loading - Training data format of ‘data/rules.yml’ is ‘unk’.

2020-10-01 12:51:24 DEBUG rasa.shared.nlu.training_data.loading - Training data format of ‘data/stories.yml’ is ‘unk’.

2020-10-01 12:51:25 DEBUG rasa.shared.importers.autoconfig - No configuration file was provided to the TrainingDataImporter.

2020-10-01 12:51:25 DEBUG pykwalify.compat - Using yaml library: /Users/nutxa36/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/ruamel/yaml/init.py

2020-10-01 12:51:25 DEBUG rasa.shared.nlu.training_data.loading - Training data format of ‘data/nlu.yml’ is ‘rasa_yml’.

2020-10-01 12:51:25 DEBUG rasa.shared.nlu.training_data.loading - Training data format of ‘data/responses.yml’ is ‘rasa_yml’.

2020-10-01 12:51:25 INFO rasa.validator - Validating intents…

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘back’ is listed in the domain file, but is not found in the NLU training data.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘more_questions’ is listed in the domain file, but is not found in the NLU training data.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘next_question’ is listed in the domain file, but is not found in the NLU training data.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘nlu_fallback’ is listed in the domain file, but is not found in the NLU training data.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘no_more_questions’ is listed in the domain file, but is not found in the NLU training data.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘out_of_scope’ is listed in the domain file, but is not found in the NLU training data.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘restart’ is listed in the domain file, but is not found in the NLU training data.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘session_start’ is listed in the domain file, but is not found in the NLU training data.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘welcome’ is listed in the domain file, but is not found in the NLU training data.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘affirm’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘back’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘deny’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘nlu_fallback’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘out_of_scope’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘restart’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘session_start’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The intent ‘welcome’ is not used in any story.

2020-10-01 12:51:25 INFO rasa.validator - Validating uniqueness of intents and stories…

2020-10-01 12:51:25 INFO rasa.validator - Validating utterances…

2020-10-01 12:51:25 DEBUG rasa.validator - The utterance ‘utter_cheer_up’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The utterance ‘utter_default’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The utterance ‘utter_happy’ is not used in any story.

2020-10-01 12:51:25 DEBUG rasa.validator - The utterance ‘utter_did_that_help’ is not used in any story.

2020-10-01 12:51:25 INFO rasa.validator - Story structure validation…

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Number of augmentation rounds is 0

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Starting data generation round 0 … (with 1 trackers)

Processed story blocks: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:00<00:00, 2761.05it/s, # trackers=1]

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Finished phase (10 training samples found).

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Data generation rounds finished.

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Found 0 unused checkpoints

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Found 10 training trackers.

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Starting data generation round 0 … (with 1 trackers)

Processed rules: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2923.88it/s, # trackers=1]

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Finished phase (2 training samples found).

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Data generation rounds finished.

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Found 0 unused checkpoints

2020-10-01 12:51:25 DEBUG rasa.shared.core.generator - Found 2 training trackers.

2020-10-01 12:51:25 INFO rasa.core.training.story_conflict - Considering the preceding 7 turns for conflict analysis.

2020-10-01 12:51:25 INFO rasa.validator - No story structure conflicts found.

2020-10-01 12:51:25 DEBUG urllib3.connectionpool - Starting new HTTPS connection (1): api.segment.io:443

2020-10-01 12:51:26 DEBUG urllib3.connectionpool - https://api.segment.io:443 “POST /v1/track HTTP/1.1” 200 21

From this, I figure out that TrainingDataImporter is not getting the config.yml. I did some digging in the rasa code and my observations are:

  • In /Users/username/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/shared/importers/autoconfig.py,

get_configuration(

config_file_path: Text, training_type: Optional[TrainingType] = TrainingType.BOTH

) → Dict[Text, Any] method should be getting config_file_path, which is basically our config.yml. It is not getting the path.

  • In /Users/username/.pyenv/versions/3.7.8/envs/rasa2.0.0rc2/lib/python3.7/site-packages/rasa/shared/importers/importer.py, class TrainingDataImporter has following methods which are not yet implemented:

    async def get_domain(self) → Domain:

      raise NotImplementedError()
    

    async def get_stories( self, template_variables: Optional[Dict] = None, use_e2e: bool = False, exclusion_percentage: Optional[int] = None, ) → StoryGraph:

      raise NotImplementedError()
    

    async def get_config(self) → Dict:

      raise NotImplementedError()
    

    async def get_nlu_data(self, language: Optional[Text] = “en”) → TrainingData:

      raise NotImplementedError()
    

I believe the methods not yet implemented might be the cause or incorrect method call somewhere in the package leads to TrainingDataImporter not getting the config.yml

I would be grateful if someone could share your thoughts with me regarding this matter. Thanks in advance!

hi @aryatejas2 - it looks like your training data isn’t formatted correctly, and it’s throwing an error and therefore not reading the config. Were you able to resolve this? We should make Rasa throw a more informative error (something we’re planning for the 2.0 release)

1 Like

Hello @amn41,

Thanks for your response. This resolved the mentioned issue!