getting error while training a model “”" ValueError: unknown training file format : unk for file config_spacy.json “”" data inside the json file { “pipeline”:“spacy_sklearn”, “path”:".models/nlu", “data”:".data/data.json" }
Can you please put the code in formatting blocks
? I’d guess your path in data
is wrong, maybe try "./data/data.json
? Also, how are you running the training? Haven’t ever seen this configuration format to be honest (but cool if it works)
all right Tobias, so what about this error while i am trying to train my model
C:\Users\sanchit\PycharmProjects\chatbots\venv\Scripts\python.exe C:/Users/sanchit/PycharmProjects/chatbots/nlu_model.py C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\training_data.py:202: UserWarning: Found empty intent, please check your training data. This may result in wrong intent predictions. warnings.warn(“Found empty intent, please check your " C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\training_data.py:221: UserWarning: Entity ‘’’’ has only 1 training examples! minimum is 2, training may fail. self.MIN_EXAMPLES_PER_ENTITY)) Traceback (most recent call last): File “C:/Users/sanchit/PycharmProjects/chatbots/nlu_model.py”, line 13, in train_nlu(”./data/data.json","./config_spacy.json","./models/nlu") File “C:/Users/sanchit/PycharmProjects/chatbots/nlu_model.py”, line 9, in train_nlu trainer.train(training_data) File “C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\model.py”, line 157, in train updates = component.train(working_data, self.config, **context) File “C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\extractors\crf_entity_extractor.py”, line 100, in train dataset = self._create_dataset(training_data.entity_examples) File “C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\extractors\crf_entity_extractor.py”, line 109, in _create_dataset dataset.append(self._from_json_to_crf(example, entity_offsets)) File “C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\extractors\crf_entity_extractor.py”, line 296, in _from_json_to_crf gold = GoldParse(doc, entities=entity_offsets) File “gold.pyx”, line 597, in spacy.gold.GoldParse.init File “gold.pyx”, line 809, in spacy.gold.biluo_tags_from_offsets ValueError: [E103] Trying to set conflicting doc.ents: ‘(0, 5, ‘greet’)’ and ‘(0, 5, ‘greeting’)’. A token can only be part of one entity, so make sure the entities you’re setting don’t overlap.
Process finished with exit code 1
Please look into the json file { “rasa_nlu_data”: { “common_examples”: [ { “text”: “Hello”, “intent”: “greet”, “entities”: [ { “start”: 0, “end”: 5, “value”: “Hello”, “entity”: “greet” }, { “start”: 0, “end”: 5, “value”: “Hello”, “entity”: “greeting” }, { “start”: 0, “end”: 5, “value”: “Hello”, “entity”: “” } ] }, { “text”: “goodbye”, “intent”: “goodbye”, “entities”: [] }, { “text”: “What’s the weather in Berlin at the moment?”, “intent”: “inform”, “entities”: [ { “start”: 22, “end”: 28, “value”: “Berlin”, “entity”: “location” } ] }, { “text”: “hey”, “intent”: “greet”, “entities”: [ { “start”: 0, “end”: 3, “value”: “hey”, “entity”: “greet” }, { “start”: 0, “end”: 3, “value”: “hey”, “entity”: “greeting” } ] }, { “text”: “hello”, “intent”: “greet”, “entities”: [] }, { “text”: “hi”, “intent”: “greet”, “entities”: [ { “start”: 0, “end”: 2, “value”: “hi”, “entity”: “greet” }, { “start”: 0, “end”: 2, “value”: “hi”, “entity”: “greeting” } ] }, { “text”: “heya”, “intent”: “greet”, “entities”: [ { “start”: 0, “end”: 4, “value”: “heya”, “entity”: “greet” }, { “start”: 0, “end”: 4, “value”: “heya”, “entity”: “greeting” } ] }, { “text”: “howdy”, “intent”: “greet”, “entities”: [ { “start”: 0, “end”: 5, “value”: “howdy”, “entity”: “greet” }, { “start”: 0, “end”: 5, “value”: “howdy”, “entity”: “greeting” } ] }, { “text”: “hey there”, “intent”: “greet”, “entities”: [ { “start”: 0, “end”: 9, “value”: “hey there”, “entity”: “greet” }, { “start”: 0, “end”: 9, “value”: “hey there”, “entity”: “greeting” } ] }, { “text”: “bye”, “intent”: “goodbye”, “entities”: [] }, { “text”: “goodbye”, “intent”: “goodbye”, “entities”: [] }, { “text”: “bye bye”, “intent”: “goodbye”, “entities”: [] }, { “text”: “see ya”, “intent”: “goodbye”, “entities”: [] }, { “text”: “see you later”, “intent”: “goodbye”, “entities”: [] }, { “text”: “What’s the weather today?”, “intent”: “inform”, “entities”: [] }, { “text”: “What’s the weather in London today?”, “intent”: “inform”, “entities”: [ { “start”: 22, “end”: 28, “value”: “London”, “entity”: “location” } ] }, { “text”: “Show me what’s the weather in Paris”, “intent”: “inform”, “entities”: [ { “start”: 30, “end”: 35, “value”: “Paris”, “entity”: “location” } ] }, { “text”: “I wonder what is the weather in Vilnius right now?”, “intent”: “inform”, “entities”: [ { “start”: 32, “end”: 39, “value”: “Vilnius”, “entity”: “location” } ] }, { “text”: “what is the weather?”, “intent”: “inform”, “entities”: [] }, { “text”: “Tell me the weather”, “intent”: “inform”, “entities”: [] }, { “text”: “Is the weather nice in Barcelona today?”, “intent”: “inform”, “entities”: [ { “start”: 23, “end”: 32, “value”: “Barcelona”, “entity”: “location” } ] }, { “text”: “I am going to London today and I wonder what is the weather out there?”, “intent”: “inform”, “entities”: [ { “start”: 14, “end”: 20, “value”: “London”, “entity”: “location” } ] }, { “text”: “I am planning my trip to Amsterdam. What is the weather out there?”, “intent”: “inform”, “entities”: [ { “start”: 25, “end”: 34, “value”: “Amsterdam”, “entity”: “location” } ] }, { “text”: “Show me the weather in Dublin, please”, “intent”: “inform”, “entities”: [ { “start”: 23, “end”: 29, “value”: “Dublin”, “entity”: “location” } ] }, { “text”: “in London”, “intent”: “inform”, “entities”: [ { “start”: 3, “end”: 9, “value”: “London”, “entity”: “location” } ] }, { “text”: “Lithuania”, “intent”: “inform”, “entities”: [ { “start”: 0, “end”: 9, “value”: “Lithuania”, “entity”: “location” } ] }, { “text”: “Oh, sorry, in Italy”, “intent”: “inform”, “entities”: [ { “start”: 14, “end”: 19, “value”: “Italy”, “entity”: “location” } ] }, { “text”: “Tell me the weather in Vilnius”, “intent”: “inform”, “entities”: [ { “start”: 23, “end”: 30, “value”: “Vilnius”, “entity”: “location” } ] }, { “text”: “The weather condition in Italy”, “intent”: “inform”, “entities”: [ { “start”: 25, “end”: 30, “value”: “Italy”, “entity”: “location” } ] }, { “text”: “What’s weather in Delhi?”, “intent”: “inform”, “entities”: [ { “start”: 18, “end”: 23, “value”: “Delhi”, “entity”: “location” } ] }, { “text”: “Whats’s weather on Mumbai?”, “intent”: “inform”, “entities”: [ { “start”: 19, “end”: 25, “value”: “Mumbai”, “entity”: “location” } ] }, { “text”: “”, “intent”: “”, “entities”: [] }, { “text”: “”, “intent”: “”, “entities”: [] } ], “regex_features”: [], “lookup_tables”: [], “entity_synonyms”: [] } }
@Sanchit Can you please format that properly?
Also it seems you are still using the deprecated rasa_nlu
framework. Can you switch to the newer and actually maintained rasa
one?
Thanks For the reply @Tobias_Wochinger Everything is up and running now. The issue is with data model. I correct that and now its working fine. Thanks Again
Great to hear