-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed crash when --domain not provided for rasa train command #3914
Fixed crash when --domain not provided for rasa train command #3914
Conversation
An Error message will be displayed in case of invalid domain file provided or no domain file provided at all for 'rasa train core' only
Thanks for submitting this PR, we'll give it a review as soon as possible! |
- Additional changes for nlu/metadata.json to make sure nlu has been trained
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @RanaMostafaAbdElMohsen! A few things before I make a thorough review:
- Now that there have been some updates to the command (I believe due to a PR for making sure temp directories get deleted), would you please solve the merge conflicts?
- Your first test makes sense -- if the provided domain is invalid, it should raise an error, not break. However, if you do
rasa train core
without providing a domain (2nd test case), in my opinion, the ideal behavior is that it would look fordomain.yml
, likerasa train
andrasa train nlu
does. Can you make that happen?
BTW, thanks for making your first PR well-tested and super descriptive! Looking forward to adding you as a code contributor. 😄
Hi @erohmensing ,
test case 1 :
test case 2 :
These two test cases failed locally on my machine; however, the test cases pass on travis CI. It fails due to permission error |
@erohmensing , Here are some test scenarios in case we made it look for domain.yml in same directory passed for
I believe that the best course of action is that if not referenced directory for |
I totally agree, and I understand what you mean now. I was thinking in the case of the working dir being the one with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality looks good! Just a few comments on the error/warning messages.
@federicotdn can you look into what he mentioned above about the temp dir tests? #3914 (comment) |
@erohmensing fixed! Take a look: #3958 |
hello @erohmensing , |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for the fix! Congrats on being a code contributor!
Edit: Oops, I'm sorry I forgot one last thing. Can you please update the changelog? It should go under fixed
-- something like
``rasa train core`` no longer crashes without a ``--domain`` arg
(the double ticks are .rst notation for this style
) I'd fix it myself but I can't write to your repo. Almost got too merge-happy 😅
Thanks @erohmensing for your help. |
Sorry, it should go under unreleased master version, not 1.1.4. Sorry for the confusion, thanks for responding so fast! (in the future, allowing people with write access to edit your contribution makes small things like this a lot easier!) |
…ased instead of 1.14
Sorry for wrong placement. Done :D |
Fixes #3794
Proposed changes:
or no domain file provided at all for
rasa train core
only--domain
argumentTests:
[CORE] Provide Invalid domain file path [Error Message Displayed]
python rasa/rasa train core --domain rasa/examples/formbot/domain1.yml --config rasa/examples/formbot/config.yml --stories rasa/examples/formbot/data/ --out rasa/examples/formbot/models --augmentation 0 --quiet
[CORE] No domain file provided [Error Message Displayed]
python rasa/rasa train core --config rasa/examples/formbot/config.yml --stories rasa/examples/formbot/data/ --out rasa/examples/formbot/models --augmentation 0 --quiet
[CORE] Provided valid domain file [PASS]
python rasa/rasa train core --domain rasa/examples/formbot/domain.yml --config rasa/examples/formbot/config.yml --stories rasa/examples/formbot/data/ --out rasa/examples/formbot/models --augmentation 0 --quiet
[NLU] No domain file provided [PASS]
python rasa/rasa train nlu --config rasa/examples/formbot/config.yml --nlu rasa/examples/formbot/data/ --out rasa/examples/formbot/models
Status (please check what you already did):
black
(please check Readme for instructions)