Skip to content
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

rasa data validation error #7709

Closed
Ooiyenchun opened this issue Jan 12, 2021 · 2 comments
Closed

rasa data validation error #7709

Ooiyenchun opened this issue Jan 12, 2021 · 2 comments
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@Ooiyenchun
Copy link

Ooiyenchun commented Jan 12, 2021

Rasa version: 2.2.4

Python version: 3.7.9

Operating system (windows, osx, ...): Windows Server 2019

Issue:

  1. The file generated by "rasa init" contains error
    "c:\programdata\anaconda3\envs\rasa\lib\site-packages\rasa\shared\utils\io.py:93: UserWarning: The example 'good afternoon' was found labeled with multiple different intents in the training data. Each annotated message should only appear with one intent. You should fix that conflict The example is labeled with: goodbye, greet."
    This was found by using "rasa data validate"

  2. Problem with "rasa data validate"
    After deleting example "good afternoon" for intent "goodbye" to resolve the conflict above. It still return an error (which does not make sense as there should not be any error left.

Error (including full traceback):

Traceback (most recent call last):
  File "c:\programdata\anaconda3\envs\rasa\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\programdata\anaconda3\envs\rasa\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\envs\rasa\Scripts\rasa.exe\__main__.py", line 7, in <module>
  File "c:\programdata\anaconda3\envs\rasa\lib\site-packages\rasa\__main__.py", line 116, in main
    cmdline_arguments.func(cmdline_arguments)
  File "c:\programdata\anaconda3\envs\rasa\lib\site-packages\rasa\cli\data.py", line 262, in validate_files
    and _validate_story_structure(validator, args)
  File "c:\programdata\anaconda3\envs\rasa\lib\site-packages\rasa\cli\data.py", line 297, in _validate_story_structure
    not args.fail_on_warnings, max_history=args.max_history
  File "c:\programdata\anaconda3\envs\rasa\lib\site-packages\rasa\validator.py", line 249, in verify_story_structure
    trackers, self.domain, max_history, self.nlu_config
  File "c:\programdata\anaconda3\envs\rasa\lib\site-packages\rasa\core\training\story_conflict.py", line 185, in find_story_conflicts
    trackers, domain, max_history, tokenizer
  File "c:\programdata\anaconda3\envs\rasa\lib\site-packages\rasa\core\training\story_conflict.py", line 245, in _find_conflicting_states
    for element in _sliced_states_iterator(trackers, domain, max_history, tokenizer):
  File "c:\programdata\anaconda3\envs\rasa\lib\site-packages\rasa\core\training\story_conflict.py", line 333, in _sliced_states_iterator
    _apply_tokenizer_to_states(tokenizer, sliced_states)
  File "c:\programdata\anaconda3\envs\rasa\lib\site-packages\rasa\core\training\story_conflict.py", line 351, in _apply_tokenizer_to_states
    Message({TEXT: state[USER][TEXT]}), TEXT
KeyError: 'text'

Command or request that led to error:

rasa init
rasa data validate

Content of training data file (nlu.yml) :

version: "2.0"

nlu:
- intent: greet
  examples: |
    - hey
    - hello
    - hi
    - hello there
    - good morning
    - good evening
    - moin
    - hey there
    - let's go
    - hey dude
    - goodmorning
    - goodevening
    - good afternoon

- intent: goodbye
  examples: |
    - cu
    - good by
    - cee you later
    - good night
    - bye
    - goodbye
    - have a nice day
    - see you around
    - bye bye
    - see you later

- intent: affirm
  examples: |
    - yes
    - y
    - indeed
    - of course
    - that sounds good
    - correct

- intent: deny
  examples: |
    - no
    - n
    - never
    - I don't think so
    - don't like that
    - no way
    - not really

- intent: mood_great
  examples: |
    - perfect
    - great
    - amazing
    - feeling like a king
    - wonderful
    - I am feeling very good
    - I am great
    - I am amazing
    - I am going to save the world
    - super stoked
    - extremely good
    - so so perfect
    - so good
    - so perfect

- intent: mood_unhappy
  examples: |
    - my day was horrible
    - I am sad
    - I don't feel very well
    - I am disappointed
    - super sad
    - I'm so sad
    - sad
    - very sad
    - unhappy
    - not good
    - not very good
    - extremly sad
    - so saad
    - so sad

- intent: bot_challenge
  examples: |
    - are you a bot?
    - are you a human?
    - am I talking to a bot?
    - am I talking to a human?

@Ooiyenchun Ooiyenchun added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Jan 12, 2021
@Ooiyenchun Ooiyenchun changed the title rasa data validate error rasa data validation error Jan 12, 2021
@sara-tagger
Copy link
Collaborator

Thanks for the issue, @yennycheung will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

@wochinge
Copy link
Contributor

duplicate of #7603

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

3 participants