How do I resolve this UserWarning?

Hi all,

I am getting the following warning. It lists all of my responses.

UserWarning: The following duplicated responses have been found across multiple domain files: utter_mood_great, utter_mood_unhappy, utter_affirm, utter_bot_challenge, utter_deny, utter_did_that_help, utter_goodbye, utter_greet, utter_help

I split up my data so each of the same intents, responses, stories for that intent, etc, is in it’s own file. So I have a file for mood_great that contains its intents, responses, etc. I assume this is the problem, but I do not have the responses duplicated in any file and the documentation makes me believe this should be fine. This method of organization makes the most sense to allow my team to contribute. Each response is only defined once.

Can you share your repo.

Hi. Thanks for the response. I just used rasa init and then moved contents of files and wrote a few of my own. Example:

$ rasa init
$ tree
β”œβ”€β”€ actions
β”‚   β”œβ”€β”€
β”‚   β”œβ”€β”€
β”‚   └── __pycache__
β”‚       β”œβ”€β”€ actions.cpython-310.pyc
β”‚       └── __init__.cpython-310.pyc
β”œβ”€β”€ config.yml
β”œβ”€β”€ credentials.yml
β”œβ”€β”€ data
β”‚   β”œβ”€β”€ nlu.yml
β”‚   β”œβ”€β”€ rules.yml
β”‚   └── stories.yml
β”œβ”€β”€ domain.yml
β”œβ”€β”€ endpoints.yml
└── tests
    └── test_stories.yml

And here’s mine:

$ tree
β”œβ”€β”€ actions # untouched
β”‚   β”œβ”€β”€
β”‚   β”œβ”€β”€
β”‚   └── __pycache__
β”‚       β”œβ”€β”€ actions.cpython-310.pyc
β”‚       └── __init__.cpython-310.pyc
β”œβ”€β”€ config.yml # untouched
β”œβ”€β”€ credentials.yml # untouched
β”œβ”€β”€ data
β”‚   β”œβ”€β”€ basic
β”‚   β”‚   β”œβ”€β”€ affirm.yml
β”‚   β”‚   β”œβ”€β”€ bot_challenge.yml
β”‚   β”‚   β”œβ”€β”€ deny.yml
β”‚   β”‚   β”œβ”€β”€ goodbye.yml
β”‚   β”‚   β”œβ”€β”€ greet.yml
β”‚   β”‚   β”œβ”€β”€ help.yml
β”‚   β”‚   β”œβ”€β”€ mood_great.yml
β”‚   β”‚   β”œβ”€β”€ mood_unhappy.yml
β”‚   β”‚   β”œβ”€β”€ out_of_scope.yml
β”‚   β”‚   └── please_rephrase.yml
β”‚   β”œβ”€β”€ domain.yml
β”œβ”€β”€ endpoints.yml # untouched
β”œβ”€β”€ rules
β”‚   └── rules.yml
└── tests
    └── test_stories.yml # untouched

And in each of the basic files, I just put each section that corresponds to that intent.

$ cat data/basic/affirm.yml 
version: "3.1"

  - affirm

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

  - text: "Thanks for confirming."

- story: affirm 1
  - intent: affirm
  - action: utter_affirm

And another:

$ cat data/basic/greet.yml 
version: "3.1"

  - greet

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

  - text: "Hi. What can I help you with?"

- story: greet 1
  - intent: greet
  - action: utter_greet

Edit: was looking at the wrong branch of the repo.

Responses have to be in the domain file. Discussed here. I suspect you have them in both your domain and your training data file based on the error message.

Ah, that makes sense then. I misunderstood and thought each of the other files were also considered β€œdomain” files. Thanks for the clarification. I’ll fix that and try again. Thanks!

Okay, all responses are now in responses.yml and I’m still getting the error.

Check out the rasa train cli options here. Responses are in the domain file and you can configure the file or directory with the --domain option.

I’ve been trying that as well. Here are the commands in my train script:

rasa train --quiet --force --config config.yml \
    --domain data \
    --data data

If you put your bot in a git repo, I’ll take a look.

In general, you can often ignore various β€˜warnings’. If they halted operation, or corrupted results, they’d appear as more serious errors or exceptions-that-must-be-handled for execution to proceed. Specifically here, both warnings are actually about β€˜deprecation’ of some method. That typically means a method’s use is discouraged in favor of some newer, more-recommended approach – but still works for now (and possibly for quite a while longer). official dunkinrunsonyou

1 Like

Thanks. I was hoping there was something I could do so the warning would disappear, but it seems I’m stuck with it. Thanks all.

Thanks for the answers, i was looking for same. .