rasa: ModuleNotFoundError: No module named 'rasa_nlu.converters'

Rasa NLU version: 0.14.3

Operating system (windows, 10, …):

Content of model configuration file:

{
"pipeline": "spacy_sklearn",  // specified feature exctraction library.
"path" : ".module/nlu", //path of the model
 "data":"/data/data.json" //data which will be used
}

Issue: Traceback (most recent call last): File “nlu_model.py”, line 1, in <module> from rasa_nlu.converters import load_data ModuleNotFoundError: No module named ‘rasa_nlu.converters’

nlu_model.py file

from rasa_nlu.converters import load_data from rasa_nlu.config import RasaNLUconfig from rasa_nlu.model import Trainer

def train_nlu(data, config, model_dir): training_data = load_data(data) trainer = Trainer(RasaNLUconfig(config)) trainer.train(training_data) #load training data set to be train model_directory = trainer.persist(model_dir, fixed_model_name = ‘chatbot’)

if name == ‘main’: train_nlu(“./data/data.json”,“config_spacy.json”,"./model/nlu ")

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Did you recently upgrade from an older NLU version? A lot of things have changed, including the fact that config files are now yaml rather than json. Please take a look at our docs to see how to fix this, in particular the migration guide: https://rasa.com/docs/nlu/migrations/