Rasa NLU version : 'rasa_nlu :- 0.11.3'
Used backend / pipeline : 'spacy_sklearn'
*Operating system *: Linux
Issue:
I am trying a code as stated on http://rasa-nlu.readthedocs.io/en/latest/python.html
from rasa_nlu.training_data import load_data
from rasa_nlu.config import RasaNLUConfig
from rasa_nlu.model import Trainer
training_data = load_data('data/examples/rasa/demo-rasa.json')
trainer = Trainer(RasaNLUConfig("sample_configs/config_spacy.json"))
trainer.train(training_data)
model_directory = trainer.persist('./projects/default/') # Returns the directory the model is stored in
But can't find load_data function from rasa_nlu.traing_data and getting following error:
Traceback (most recent call last):
File "/home/user/Desktop/rasa_nlu/rasa.py", line 1, in
from rasa_nlu.training_data import load_data
ImportError: cannot import name load_data
Please help me ASAP.
Thanks....
the function is here: https://github.com/RasaHQ/rasa_nlu/blob/master/rasa_nlu/training_data/loading.py#L41
have you installed Rasa NLU using pip?
Okay, I got it Thanks...
should be from rasa_nlu.converters import load_data, then you can easily find load_data from converters https://stackoverflow.com/questions/49177294/i-can%C2%B4t-find-the-load-data-function-from-rasa-nlu-training-data
I am getting the same issue in my nlu_model.py
How to solve this issue?
cannot import name 'load_data' from 'rasa_nlu.training_data' (C:\python\lib\site-packages\rasa_nlu\training_data.py)
Okay, I got it Thanks...
How did you resolve it? I am getting the same error.