RasaHQ / rasa_lookup_demo

Improving entity extraction from text using the lookup table feature in rasa_nlu
Apache License 2.0
52 stars 68 forks source link

Error training data on examples provided in repo. #2

Closed c-chaitanya closed 5 years ago

c-chaitanya commented 5 years ago

I've been following this totorial I Cloned the repo, and when I run python run_lookup.py everything works fine(i.e it gives me precision and recall). When I try to train a model on food data provided using cmd python -m rasa_nlu.train -c /home/chaitanya/rasa_lookup_demo/configs/config.yaml --data food -o models --project current --verbose it loads spacy model and throws error

2019-04-01 11:33:54 INFO     rasa_nlu.training_data.training_data  - Training data stats: 
    - intent examples: 36 (1 distinct intents)
    - Found intents: 'restaurant_search'
    - entity examples: 19 (1 distinct entities)
    - found entities: 'food'

Traceback (most recent call last):
  File "/home/chaitanya/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/chaitanya/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/chaitanya/Desktop/rasanlu_final/venv/lib/python3.6/site-packages/rasa_nlu/train.py", line 184, in <module>
    num_threads=cmdline_args.num_threads)
  File "/home/chaitanya/Desktop/rasanlu_final/venv/lib/python3.6/site-packages/rasa_nlu/train.py", line 153, in do_train
    training_data = load_data(data, cfg.language)
  File "/home/chaitanya/Desktop/rasanlu_final/venv/lib/python3.6/site-packages/rasa_nlu/training_data/loading.py", line 55, in load_data
    data_sets = [_load(f, language) for f in files]
  File "/home/chaitanya/Desktop/rasanlu_final/venv/lib/python3.6/site-packages/rasa_nlu/training_data/loading.py", line 55, in <listcomp>
    data_sets = [_load(f, language) for f in files]
  File "/home/chaitanya/Desktop/rasanlu_final/venv/lib/python3.6/site-packages/rasa_nlu/training_data/loading.py", line 109, in _load
    raise ValueError("Unknown data format for file {}".format(filename))
ValueError: Unknown data format for file food/lookup/food.txt

Im using a virtual environment and my versions are

rasa-core==0.13.6
rasa-core-sdk==0.12.2
rasa-nlu==0.14.6
akelad commented 5 years ago

I think this is a separate issue than the one you tagged. @paulaWesselmann will look into this one for you

paulaWesselmann commented 5 years ago

Hey @chaitu9701, can you send me how your lookup table file looks like? The externally supplied lookup tables must be in a newline-separated format.

c-chaitanya commented 5 years ago

It's the same file, I obtained while doing a git clone, the file I'm trying to train is in the food folder. I'm using python3.6 anaconda version. Please let me know if you still need the file

paulaWesselmann commented 5 years ago

The link to the tutorial doesn't work, I cannot see what the file looks like. Maybe can you just copy the first few lines here.

c-chaitanya commented 5 years ago

the folder named data/company in this git repo https://github.com/RasaHQ/rasa_lookup_demo/tree/master/data. And thank you for the quick response

paulaWesselmann commented 5 years ago

I am confused now, why the folder data/company? I though we were talking about this file: https://github.com/RasaHQ/rasa_lookup_demo/blob/master/data/food/food.txt which looks all good by the way.

c-chaitanya commented 5 years ago

I'm facing the same issue with both food and company. The command which gives me the error is when i try to train it using python -m rasa_nlu.train -c /home/chaitanya/rasa_lookup_demo/configs/config.yaml --data food -o models --project current --verbose

paulaWesselmann commented 5 years ago

Ah I see, if you are using all files in the food folder for nlu training you have to remove the food.txt file from there, since nlu data has to be .md

c-chaitanya commented 5 years ago

Ah, thanks for the update. Will try that

c-chaitanya commented 5 years ago

That solved the issue, I sincerely thank you for your time and effort.