Problem about train rasa_nlu

when i train rasa_nlu by using

 python3 -m rasa_nlu.train -c news_jieba_mitie_sklearn.json

it show me :

usage: train.py [-h] [-o PATH] (-d DATA | -u URL) -c CONFIG [-t NUM_THREADS]

           [--project PROJECT] [--fixed_model_name FIXED_MODEL_NAME]

           [--storage STORAGE] [--debug] [-v]

train.py: error: one of the arguments -d/–data -u/–url is required

means i have have to add one of the arguments data or url,but when i train it by using

python3 -m rasa_nlu.train -c news_jieba_mitie_sklearn.json -d data/examples/rasa/demo-rasa_zh.json

it show me :

Traceback (most recent call last):

File “/usr/local/python3/lib/python3.6/runpy.py”, line 193, in _run_module_as_main “main”, mod_spec)

File “/usr/local/python3/lib/python3.6/runpy.py”, line 85, in _run_code exec(code, run_globals)

File “/root/rasa/rasa_nlu_chi/rasa_nlu/train.py”, line 174, in num_threads=cmdline_args.num_threads)

File “/root/rasa/rasa_nlu_chi/rasa_nlu/train.py”, line 143, in do_train trainer = Trainer(cfg, component_builder)

File “/root/rasa/rasa_nlu_chi/rasa_nlu/model.py”, line 146, in init components.validate_requirements(cfg.component_names)

File “/root/rasa/rasa_nlu_chi/rasa_nlu/config.py”, line 146, in component_names return [c.get(“name”) for c in self.pipeline]

File “/root/rasa/rasa_nlu_chi/rasa_nlu/config.py”, line 146, in return [c.get(“name”) for c in self.pipeline]

AttributeError: ‘str’ object has no attribute ‘get’

news_jieba_mitie_sklearn.json:

{
  "name": "rasa_nlu",
  "project": "news",
  "fixed_model_name": "demo",
  "pipeline": ["nlp_mitie",
        "tokenizer_jieba",
        "ner_mitie",
        "ner_synonyms",
        "intent_entity_featurizer_regex",
        "intent_featurizer_mitie",
        "intent_classifier_sklearn"],
  "language": "zh",
  "mitie_file": "data/total_word_feature_extractor_zh.dat",
  "path" : "models",
  "data" : "data/examples/rasa/demo-rasa_zh.json",
}

somebody can tell me how to solve it ? Thanks.

which version of rasa_nlu are you using?

if you are using latest version of rasa nlu you can have a look here Component Configuration

1 Like

when i using

python3 -m rasa_nlu.server -c test_jieba_mitie_sklearn.yml --path models

it runs ! Because i use the 0.12.2 version. Thanks!

it solves.Thanks!