Interactive learning keeps displaying placeholder image after every sent message

My colleague (@amvas) has already posted a few questions concerning our setup, but I’m hoping to maybe get some explanations on what is happening. We’ve followed the docker-compose quick install and the manual install, and we’ve gotten quite familiar with the rasa setup in the process. We’d like to go over what we’re doing during setup that is custom so that maybe someone (@Tobias_Wochinger ?) can point out where things are going wrong.

First thing’s first, versions:

  • Rasa-X – 0.27.4
  • Rasa-production/worker – 1.9.2
  • Rasa-sdk – 1.9.0

Ansible playbook modifications

Unfortunately, the ansible docker role is no good for us because of certain security constraints. For example, we don’t want /usr/local/bin/docker-compose to belong to root:root, amongst other things. Therefore, we’ve removed the role from the playbook. If you think that the docker role could be playing a part in this, please let us know, and we will arrange to test with complete default settings, as per the rasa docs.

Custom action server

For our action server, we needed a few other packages, so we built our own image as follows:

FROM rasa/rasa-sdk:1.9.0

USER root

RUN pip install \
        pandas \
        xlrd

RUN mkdir /app/actions && \
    touch /app/actions/__init__.py

USER 1001

Apart from these changes, the docker-compose.yml is unchanged, except some volume paths for models and actions.

The strange part is that there is nothing in the logs that indicates that an error is occuring. We’ve also noticed that if this strange bug is not occurring, then the endless GET loop is occurring.

Sample logs of infinite loop from saying hi

rasa-x_1           | [2020-04-06 20:41:52 +0000] - (sanic.access)[INFO][192.168.192.10:38536]: GET http://wild/api/conversations/16793008c0b84b12b49a513436f5d717?since=1586203902.8778882&environment=production  200 305
nginx_1            | 10.176.72.128 - - [06/Apr/2020:20:41:52 +0000] "GET /api/conversations/16793008c0b84b12b49a513436f5d717?since=1586203902.8778882&environment=production HTTP/1.1" 200 305 "http://wild:8989/interactive" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36"
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.nlu.classifiers.diet_classifier  - There is no trained model: component is either not trained or didn't receive enough training data.
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.nlu.selectors.response_selector  - Adding following selector key to message property: default
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.processor  - Received user message 'hi' with intent '{'name': 'greet', 'confidence': 0.9891678690910339}' and entities '[]'
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 8 events.
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, {'slot_postal_code_pattern_0': 1.0, 'slot_first_name_0': 1.0, 'slot_last_name_0': 1.0}, {'intent_greet': 1.0, 'slot_last_name_0': 1.0, 'slot_postal_code_pattern_0': 1.0, 'prev_action_listen': 1.0, 'slot_first_name_0': 1.0}, {'intent_greet': 1.0, 'prev_utter_greet': 1.0, 'slot_last_name_0': 1.0, 'slot_postal_code_pattern_0': 1.0, 'slot_first_name_0': 1.0}, {'intent_greet': 1.0, 'slot_last_name_0': 1.0, 'slot_postal_code_pattern_0': 1.0, 'prev_action_listen': 1.0, 'slot_first_name_0': 1.0}]
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_1_TEDPolicy
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.processor  - Predicted next action 'utter_greet' with confidence 0.98.
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.processor  - Action 'utter_greet' ended with events '[BotUttered('Hey! How are you?', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {}, 1586205713.0820062)]'.
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.policies.memoization  - Current tracker state [{'slot_postal_code_pattern_0': 1.0, 'slot_first_name_0': 1.0, 'slot_last_name_0': 1.0}, {'intent_greet': 1.0, 'slot_last_name_0': 1.0, 'slot_postal_code_pattern_0': 1.0, 'prev_action_listen': 1.0, 'slot_first_name_0': 1.0}, {'intent_greet': 1.0, 'prev_utter_greet': 1.0, 'slot_last_name_0': 1.0, 'slot_postal_code_pattern_0': 1.0, 'slot_first_name_0': 1.0}, {'intent_greet': 1.0, 'slot_last_name_0': 1.0, 'slot_postal_code_pattern_0': 1.0, 'prev_action_listen': 1.0, 'slot_first_name_0': 1.0}, {'intent_greet': 1.0, 'prev_utter_greet': 1.0, 'slot_last_name_0': 1.0, 'slot_postal_code_pattern_0': 1.0, 'slot_first_name_0': 1.0}]
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.policies.mapping_policy  - There is no mapped action for the predicted intent, 'greet'.
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_1_TEDPolicy
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 1.00.
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'.
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '16793008c0b84b12b49a513436f5d717'
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
rasa-production_1  | {"sender_id": "16793008c0b84b12b49a513436f5d717", "event": "user", "timestamp": 1586205713.0267847, "text": "hi", "parse_data": {"intent": {"name": "greet", "confidence": 0.9891678690910339}, "entities": [], "intent_ranking": [{"name": "greet", "confidence": 0.9891678690910339}, {"name": "no_follow_up_question", "confidence": 0.0037946966476738453}, {"name": "very_good", "confidence": 0.001964196562767029}, {"name": "goodbye", "confidence": 0.0012712101452052593}, {"name": "not_goal_oriented", "confidence": 0.0010604450944811106}, {"name": "good", "confidence": 0.0009501387248747051}, {"name": "postal_code_int", "confidence": 0.0005311700515449047}, {"name": "first_name_intent", "confidence": 0.00047945082769729197}, {"name": "mood_unhappy", "confidence": 0.0003946855431422591}, {"name": "FAQ-Claim-DeductibleDefinition", "confidence": 0.0003862159501295537}], "response_selector": {"default": {"response": {"name": null, "confidence": 0.0}, "ranking": [], "full_retrieval_intent": null}}, "text": "hi"}, "input_channel": "rasa", "message_id": "80b317b0f2904f17a0642501b7809421", "metadata": {}}
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
rasa-production_1  | {"sender_id": "16793008c0b84b12b49a513436f5d717", "event": "action", "timestamp": 1586205713.0823083, "name": "utter_greet", "policy": "policy_1_TEDPolicy", "confidence": 0.9790730476379395}
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
rasa-production_1  | {"sender_id": "16793008c0b84b12b49a513436f5d717", "event": "bot", "timestamp": 1586205713.0823255, "text": "Hey! How are you?", "data": {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, "metadata": {}}
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
rasa-production_1  | {"sender_id": "16793008c0b84b12b49a513436f5d717", "event": "action", "timestamp": 1586205713.1323676, "name": "action_listen", "policy": "policy_1_TEDPolicy", "confidence": 0.9971696138381958}
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.tracker_store  - Tracker with sender_id '16793008c0b84b12b49a513436f5d717' stored to database
rasa-production_1  | 2020-04-06 20:41:53 DEBUG    rasa.core.lock_store  - Deleted lock for conversation '16793008c0b84b12b49a513436f5d717'.
rasa-x_1           | [2020-04-06 20:41:53 +0000] [164] [DEBUG] CORS: Request to '/api/conversations/16793008c0b84b12b49a513436f5d717/messages' matches CORS resource '/*'. Using options: {'origins': ['.*'], 'methods': 'DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT', 'allow_headers': ['.*'], 'expose_headers': 'X-Total-Count', 'supports_credentials': False, 'max_age': 1800, 'send_wildcard': False, 'automatic_options': True, 'vary_header': True, 'resources': '/*', 'intercept_exceptions': True, 'always_send': True}
rasa-x_1           | [2020-04-06 20:41:53 +0000] - (sanic.access)[INFO][192.168.192.10:38534]: POST http://wild/api/conversations/16793008c0b84b12b49a513436f5d717/messages?environment=production  200 80
nginx_1            | 10.176.72.128 - - [06/Apr/2020:20:41:53 +0000] "POST /api/conversations/16793008c0b84b12b49a513436f5d717/messages?environment=production HTTP/1.1" 200 80 "http://wild:8989/interactive" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36"
rasa-x_1           | [2020-04-06 20:41:53 +0000] [162] [DEBUG] CORS: Request to '/api/conversations/16793008c0b84b12b49a513436f5d717' matches CORS resource '/*'. Using options: {'origins': ['.*'], 'methods': 'DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT', 'allow_headers': ['.*'], 'expose_headers': 'X-Total-Count', 'supports_credentials': False, 'max_age': 1800, 'send_wildcard': False, 'automatic_options': True, 'vary_header': True, 'resources': '/*', 'intercept_exceptions': True, 'always_send': True}
rasa-x_1           | [2020-04-06 20:41:53 +0000] - (sanic.access)[INFO][192.168.192.10:38546]: GET http://wild/api/conversations/16793008c0b84b12b49a513436f5d717?since=1586203902.8778882&environment=production  200 305
nginx_1            | 10.176.72.128 - - [06/Apr/2020:20:41:53 +0000] "GET /api/conversations/16793008c0b84b12b49a513436f5d717?since=1586203902.8778882&environment=production HTTP/1.1" 200 305 "http://wild:8989/interactive" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36"
rasa-x_1           | [2020-04-06 20:41:54 +0000] [162] [DEBUG] CORS: Request to '/api/conversations/16793008c0b84b12b49a513436f5d717' matches CORS resource '/*'. Using options: {'origins': ['.*'], 'methods': 'DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT', 'allow_headers': ['.*'], 'expose_headers': 'X-Total-Count', 'supports_credentials': False, 'max_age': 1800, 'send_wildcard': False, 'automatic_options': True, 'vary_header': True, 'resources': '/*', 'intercept_exceptions': True, 'always_send': True}
rasa-x_1           | [2020-04-06 20:41:54 +0000] - (sanic.access)[INFO][192.168.192.10:38554]: GET http://wild/api/conversations/16793008c0b84b12b49a513436f5d717?since=1586203902.8778882&environment=production  200 305

Thank you for your help

Could someone from Rasa team take a look at this issue, @akelad , @Tobias_Wochinger. Thanks

Sorry but I’m not sure I quite understand what the issue is from your description? What’s the behaviour of the bot?

There are two issues, either the placeholder image is displayed after every message sent (ie. the messages disappear and the placeholder re-appears) or there is an infinite loop of GET requests with the three little dots indicating the bot is typing.

1 Like

Sorry for dropping this, but basically what you’re saying is the response from the bot never appears in the UI? Could you send me a screenshot of the network requests in the browser when sending a message to the bot?