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 test/rasa test core can't find any intent in domain #8135

Closed
subercui opened this issue Mar 7, 2021 · 19 comments · Fixed by #8388
Closed

Rasa test/rasa test core can't find any intent in domain #8135

subercui opened this issue Mar 7, 2021 · 19 comments · Fixed by #8388
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/model-testing Issues focused around testing models (e.g. via `rasa test`) type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@subercui
Copy link

subercui commented Mar 7, 2021

Rasa version:
2.3.4
Rasa SDK version (if used & relevant):
2.3.1
Rasa X version (if used & relevant):

Python version:
3.8.8
Operating system (windows, osx, ...):
Linux-4.4.0-186-generic-x86_64-with-glibc2.10
Issue:
This is annoying. There is no error in training and testing manually, but rasa test/rasa test core can't find any intent in domain.

Error (including full traceback):
Found intent 'xxxx' in stories which is not part of the domain.

/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'how_can_i_help_you' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'tell_what_we_have' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'ask_color' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'ask_quantity' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'tell_total_charge' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'greet' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'mood_great' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'goodbye' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'mood_unhappy' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'affirm' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'deny' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp3z0di4sm/0441e511624c4c069bf1b3cf0526e1b4_test_stories.yml': 
Found intent 'bot_challenge' in stories which is not part of the domain.

Command or request that led to error:

rasa test

Content of configuration file (config.yml) (if relevant):

Content of domain file (domain.yml) (if relevant):

version: "2.0"

intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
- how_can_i_help_you
- what_do_you_need
- tell_what_we_have
- tell_no_eraser
- ask_color
- ask_quantity
- tell_total_charge

responses:
  utter_buy_eraser:
  - text: "I want to buy erasers."

  utter_buy_pencils:
  - text: "OK, then I will buy some pencils."

  utter_buy_red_pencils:
  - text: "I would like some red pencils."
  
  utter_buy_ten_pencils:
  - text: "I want 10 pencils."

  utter_how_much:
  - text: "How much are they?"

  utter_pay:
  - text: "Great. Here is the money."

  utter_greet:
  - text: "Hey! How are you?"

  utter_cheer_up:
  - text: "Here is something to cheer you up:"
    image: "https://i.imgur.com/nGF1K8f.jpg"

  utter_did_that_help:
  - text: "Did that help you?"

  utter_happy:
  - text: "Great, carry on!"

  utter_goodbye:
  - text: "Goodbye"

  utter_iamabot:
  - text: "I am a bot, powered by Rasa."

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true
@subercui subercui 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 Mar 7, 2021
@sara-tagger
Copy link
Collaborator

Thanks for raising this issue, @m-vdb will get back to you about it soon✨

Please also check out the docs and the forum in case your issue was raised there too 🤗

@m-vdb
Copy link
Collaborator

m-vdb commented Mar 9, 2021

Hi @subercui, thanks for opening an issue for this. In order to understand the problem here, would it be possible for you to share:

  • the stories files that you have
  • the project structure (files, folders)

Was there any warning when you ran rasa train before testing the model? Have you tried specifying the path to the trained model with the -m option?

@m-vdb m-vdb added the status:more-details-needed Waiting for the user to provide more details / stacktraces / answer a question label Mar 9, 2021
@subercui
Copy link
Author

Hi @m-vdb

I encounter the same issue even with rasa init project.

image

story:

version: "2.0"

stories:

- story: happy path
  steps:
  - intent: greet
  - action: utter_greet
  - intent: mood_great
  - action: utter_happy

- story: sad path 1
  steps:
  - intent: greet
  - action: utter_greet
  - intent: mood_unhappy
  - action: utter_cheer_up
  - action: utter_did_that_help
  - intent: affirm
  - action: utter_happy

- story: sad path 2
  steps:
  - intent: greet
  - action: utter_greet
  - intent: mood_unhappy
  - action: utter_cheer_up
  - action: utter_did_that_help
  - intent: deny
  - action: utter_goodbye

warnings:

 The 'version' key is missing in the training data file /tmp/tmp1u2xd_3q/241c173ef1f64ed5b7b2af2c011581b2_test_stories.yml. Rasa Open Source will read the file as a version '2.0' file. See https://rasa.com/docs/rasa/training-data-format.
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp1u2xd_3q/241c173ef1f64ed5b7b2af2c011581b2_test_stories.yml': 
Found intent 'greet' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp1u2xd_3q/241c173ef1f64ed5b7b2af2c011581b2_test_stories.yml': 
Found intent 'mood_great' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp1u2xd_3q/241c173ef1f64ed5b7b2af2c011581b2_test_stories.yml': 
Found intent 'goodbye' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp1u2xd_3q/241c173ef1f64ed5b7b2af2c011581b2_test_stories.yml': 
Found intent 'mood_unhappy' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp1u2xd_3q/241c173ef1f64ed5b7b2af2c011581b2_test_stories.yml': 
Found intent 'affirm' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp1u2xd_3q/241c173ef1f64ed5b7b2af2c011581b2_test_stories.yml': 
Found intent 'deny' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/h/haotian/.conda/envs/rasa/lib/python3.8/site-packages/rasa/shared/utils/io.py:93: UserWarning: Issue found in '/tmp/tmp1u2xd_3q/241c173ef1f64ed5b7b2af2c011581b2_test_stories.yml': 
Found intent 'bot_challenge' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories

@no-response no-response bot removed the status:more-details-needed Waiting for the user to provide more details / stacktraces / answer a question label Mar 10, 2021
@gdebaisi
Copy link

gdebaisi commented Mar 29, 2021

Hello,

We also have this issue when testing our stories with a rasa test core --stories <stories_folder>, plus an issue at the end of the test :

100%|██████████| 103/103 [00:01<00:00, 92.66it/s]
Traceback (most recent call last):
File "/opt/venv/bin/rasa", line 8, in
sys.exit(main())
File "/opt/venv/lib/python3.8/site-packages/rasa/main.py", line 116, in main
cmdline_arguments.func(cmdline_arguments)
File "/opt/venv/lib/python3.8/site-packages/rasa/cli/test.py", line 104, in run_core_test
test_core(
File "/opt/venv/lib/python3.8/site-packages/rasa/test.py", line 157, in test_core
rasa.utils.common.run_in_loop(test(stories, _agent, out_directory=output, **kwargs))
File "/opt/venv/lib/python3.8/site-packages/rasa/utils/common.py", line 307, in run_in_loop
result = loop.run_until_complete(f)
File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
File "/opt/venv/lib/python3.8/site-packages/rasa/core/test.py", line 874, in test
evaluate_entities(
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/test.py", line 856, in evaluate_entities
aligned_predictions = align_all_entity_predictions(entity_results, extractors)
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/test.py", line 1216, in align_all_entity_predictions
aligned_predictions.append(align_entity_predictions(result, extractors))
File "/opt/venv/lib/python3.8/site-packages/rasa/nlu/test.py", line 1119, in align_entity_predictions
for t in result.tokens:
TypeError: 'NoneType' object is not iterable

The command used was :
rasa test core --stories tests_resources/test_stories.

This happens with the 2.4.3 version of rasa.
Any news on this issue ?

@m-vdb
Copy link
Collaborator

m-vdb commented Apr 15, 2021

thanks for following-up and adding more details to the issue 👍🏻 we'll take care of prioritising it!

@TyDunn TyDunn added the area:rasa-oss/model-testing Issues focused around testing models (e.g. via `rasa test`) label Apr 16, 2021
@manav1105
Copy link

how did you solved this error?

@m-vdb
Copy link
Collaborator

m-vdb commented Apr 28, 2021

It's not solved yet, we have a pull request under review at the moment 😃

@rgstephens
Copy link
Contributor

Also encountering this when the domain contents are in the /data directory. Forum user reported this also.

@Richa2112
Copy link

Facing the same issue.

@camiloiglesias96
Copy link

Same issue for command

rasa test nlu

😢

@m-vdb
Copy link
Collaborator

m-vdb commented May 28, 2021

thanks for the heads up folks. I don't think that the fix is released at the moment. It should be out next week with the Rasa 2.7. Stay tuned!

@Zajano
Copy link

Zajano commented Aug 11, 2021

Has this been solved? I am having this issue with both "data validate" and "test nlu --cross-validation"

When I use "-d domain_location" for validation it works perfectly, but with no such flag for cross-validation I'm not sure what to do. I am using multiple domain files and tried consolidation them all into 1 file, and I am still getting the "missing intent" errors for both.

@sibbsnb
Copy link
Contributor

sibbsnb commented Aug 17, 2021

same here, many invalid errors

@m-vdb
Copy link
Collaborator

m-vdb commented Aug 18, 2021

Hi folks 👋🏻 Would it be possible for you to ask your question on the forum (if not already done)? It'd be super helpful if you could share more details about the errors you're encountering there, that way we can see if it's a usage error or an actual bug. Thanks!

@AhChing12
Copy link

I've encountered this problem as well and fixed it. Try checking your nly.yml and domain.yml if there are any repetition of intents included. Hope this helps.

@HSaurabh0919
Copy link

I encountered the same problem and the problem was solved by changing config.yml file policies.
Earlier I add RulePolicy only to policies and maybe it was not going for story part. So I finally changed the config file as below:

policies:
  - name: MemoizationPolicy
  - name: RulePolicy
  - name: UnexpecTEDIntentPolicy
    max_history: 5
    epochs: 100
  - name: TEDPolicy
    max_history: 5
    epochs: 100
    constrain_similarities: true

@Zulfiquar15
Copy link

I encountered the same problem and the problem was solved by changing config.yml file policies. Earlier I add RulePolicy only to policies and maybe it was not going for story part. So I finally changed the config file as below:

policies:
  - name: MemoizationPolicy
  - name: RulePolicy
  - name: UnexpecTEDIntentPolicy
    max_history: 5
    epochs: 100
  - name: TEDPolicy
    max_history: 5
    epochs: 100
    constrain_similarities: true

tried didn't work

@kunalt25
Copy link

I am facing issue of
UserWarning: Issue found in 'data\stories.yml': The story has no steps. It will be skipped.

I have well defined stories as follow

#jversion: "3.1"
version: "3.1"

stories:

  • story: greet and goodbye
    steps:

    • intent: greet
    • action: utter_greet
    • intent: goodbye
    • action: utter_goodbye
  • story: Story 1
    steps:

    • user: क्या आज दिल्ली में बारिश होगी?
      intent: inform_weather
      entities:
      • U-location: दिल्ली
      • U-weather_type: बारिश
    • action: utter_inform_weather
  • story: inform weather

  • steps:

    • intent: inform_weather
      entities:
      • U-weather_type: बारिश
    • slot_was_set:
      • U-weather_type: बारिश
    • action: utter_inform_weather
  • story: inform weather

  • steps:

    • intent: inform_weather
      entities:
      • U-weather_type: बारिश
      • U-location: दिल्ली
    • slot_was_set:
      • U-weather_type: बारिश
      • U-location: दिल्ली
    • action: utter_inform_weather

please suggest solution

@Zulfiquar15
Copy link

Zulfiquar15 commented Feb 28, 2023 via email

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 area:rasa-oss/model-testing Issues focused around testing models (e.g. via `rasa test`) type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.