Rasa version: current master branch, 1.0.0a3 and 1.0.0a2 and possibly earlier
Python version: Python 3.6.8 :: Anaconda, Inc.
Operating system (windows, osx, ...): Windows 10 Enterprise
Issue:
I get the following error when I run the example in the Rasa online documentation:
https://rasa.com/docs/get_started_step2/
C:\Users\xxxxxxxx\AppData\Local\Continuum\anaconda3\envs\rasa\python.exe C:/Dev/Rasa/rasa/rasa train nlu -c config/nlu_config.yml --data data/nlu.md -o models --verbose
usage: rasa [-h] [--version]
{init,run,shell,train,interactive,test,show,data,x} ...
rasa: error: unrecognized arguments: --data data/nlu.md
Process finished with exit code 2
I get the same error when I run it in a Jupyter notebook or in PyCharm IDE. I have tried to search the source code and debug it myself, but I'm not quite familiar enough with the project code to find it. I have also done a quick search in the branch (master) to see if this command line argument has been changed since the version in the documentation, but I don't see anything there.
Content of configuration file (config.yml):
Unedited
language: en
pipeline: supervised_embeddings
policies:
- name: KerasPolicy
epochs: 200
batch_size: 50
max_training_samples: 300
- name: FallbackPolicy
fallback_action_name: 'action_default_fallback'
- name: MemoizationPolicy
max_history: 5
- name: MappingPolicy
Content of domain file (domain.yml) (if used & relevant):
Unedited
allowempty: True
mapping:
intents:
type: "seq"
sequence:
- type: "map"
mapping:
use_entities:
type: "bool"
allowempty: True
- type: "str"
entities:
type: "seq"
sequence:
- type: "str"
actions:
type: "seq"
sequence:
- type: "str"
required: True
templates:
type: "map"
allowempty: True
slots:
type: "map"
allowempty: True
forms:
type: "seq"
sequence:
- type: "str"
allowempty: True
@MetcalfeTom I believe you've fixed this with https://github.com/RasaHQ/rasa/pull/3363 ?
@tpacker if you check out rasa train nlu --help, you'll find that rasa train nlu takes the argument -u for nlu data instead of --data. rasa train takes --data (I ran into this exact issue yesterday).
AFAIK the Get Started is still setup with the old python -m ... commands -- it's fine for you to follow it and change the commands to reflect master, but you should know that if you want to run a full model in the end, you should train it with rasa train, instead of separately doing rasa train nlu and rasa train core. Same with rasa run instead of rasa run core with the full model.
so I guess we can close this right?
Thanks.
I did look at the help string rasa train nlu --help a few times and didn't think I could see any replacement. But it's possible I overlooked it. I will try it again when I have time in the next few days.
Btw, I know we all like to see tickets closed, but I think it's best if we wait until the reporter can verify that the fix worked. That may mean waiting a day or more, as in this case when I apparently live in a very different time zone from you guys.
I see I must have missed that -u in the help string before. I found it this time. It still does not complete training, though. I'll have to try stepping through the code when I have more time to see if I can understand this error:
2019-05-03 08:54:05 ERROR rasa.nlu.classifiers.embedding_intent_classifier - Can not train an intent classifier. Need at least 2 different classes. Skipping training of intent classifier.
I'm following the online tutorial as well as I can given the differences in the new code. Is there an updated tutorial somewhere in the source code that corresponds better with the newest code? I would hope we have a way to editing documentation and tutorials at the same time that code is updated, so they stay in sync, and that they can be easily released to "production" at the same time. Is this right? If so, I'ld like to follow the new tutorial as I test the new code. Thanks.
@tpacker do you have more than one intent in your nlu.md file? It cannot "classify" an intent as one or another if there's only one.
With regards to your second question, normally we do update docs as we update code, but the main landing of the docs is not versioned like the Core and NLU pages are. The docs/tutorials will indeed be updated when this code is released to production -- neither master branch nor 1.0.0a3 and 1.0.0a2 is yet production code. If we were to update the tutorial to reflect master, it would break for anyone who installed it using the recommended installation instructions.
If you are not yet familiar with Rasa, I would suggest not working with the bleeding edge, as it's bound to have bugs and be less well-documented, and rather stick to the installation instructions here, which were linked to from the tutorial.
I'm following the tutorial here: https://rasa.com/docs/get_started_step2/ Which seems to have multiple intents in the first step. Maybe it's not finding my input files. I'll check next week.
Yes, I figured the online tutorial should not be updated yet, but that the "source code" for the online tutorial should be updated and kept separate somewhere and verified along with the dev code before both are "rolled to production" together. If so, where is the newest draft tutorial?
Good advice. I may back away from the source code and the master branch until I've played around with the production version for a while. I'm just itching to get into the code. As a long-time software engineer and data scientist with a PhD in NLP, conceptual models, and information extraction and a masters in natural language generation, I have lots of ideas I hope to contribute to Rasa.
Awesome, we love contributors! I'm sure you'll have lots of great stuff to add, but it's definitely easier to get used to stuff in the stable versions than the master version. We are in the process updating the format of the quickstart, which is why it is not available yet.
As for the Can not train an intent classifier error you ran into, if you do have more than one intent, this may be a bug on master, as I may have seen other people running into that too. We'll look into it.
Most helpful comment
@tpacker if you check out
rasa train nlu --help, you'll find thatrasa train nlutakes the argument-ufor nlu data instead of--data.rasa traintakes--data(I ran into this exact issue yesterday).AFAIK the Get Started is still setup with the old
python -m ...commands -- it's fine for you to follow it and change the commands to reflect master, but you should know that if you want to run a full model in the end, you should train it withrasa train, instead of separately doingrasa train nluandrasa train core. Same withrasa runinstead ofrasa run corewith the full model.