facebookresearch / facebookresearch/fairo
"dance" throws IndexError('Cannot choose from an empty sequence') in mc_interpreter.py
- Dominant language
- Jupyter Notebook
- Stars
- 929
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
## Description
This error occurred in a [Turk interaction session](https://s3.console.aws.amazon.com/s3/object/craftassist?prefix=turk_interactions_with_agent/turk/0/).
"dance" command is pulled from ground truth and triggered an agent failure. Environment is dashboard running in ECR container instances.
## Type of Issue
Select the type of issue:
- [x] Bug report (to report a bug)
- [ ] Feature request (to request an additional feature)
- [ ] Tracker (I am just using this as a tracker)
- [ ] Refactor request
- [ ] Documentation Ask
## Current Behavior
```
2021-04-09 03:16:22,486 [loco_mc_agent.py:269 - controller_step() INFO]: Incoming chats: [' dance']
INFO:root:Found ground truth action for "dance"
2021-04-09 03:16:23,743 [nsp_dialogue_manager.py:328 - get_logical_form() INFO]: Found ground truth action for "dance"
INFO:root:logical form post-coref "8e5e8abc3ae8f08d000440ab90d4b0e309cb89da686f6bbf67a927fb0e1bb4a5:1dbcc24a8b4943f7a80ea6d8c354963b" -> {'dialogue_type': 'HUMAN_GIVE_COMMAND', 'action_sequence': [{'dance_type': {'filters': {'triples': [{'pred_text': 'has_name', 'obj_text': 'dance'}]}}, 'action_type': 'DANCE'}]}
2021-04-09 03:16:23,771 [nsp_dialogue_manager.py:172 - handle_logical_form() INFO]: logical form post-coref "8e5e8abc3ae8f08d000440ab90d4b0e309cb89da686f6bbf67a927fb0e1bb4a5:1dbcc24a8b4943f7a80ea6d8c354963b" -> {'dialogue_type': 'HUMAN_GIVE_COMMAND', 'action_sequence': [{'dance_type': {'filters': {'triples': [{'pred_text': 'has_name', 'obj_text': 'dance'}]}}, 'action_type': 'DANCE'}]}
ERROR:root:Default handler caught exception, db_log_idx=2404783
Traceback (most recent call last):
File "/droidlet/craftassist/agent/../../base_agent/core.py", line 18, in start
self.step()
File "/droidlet/craftassist/agent/../../base_agent/loco_mc_agent.py", line 226, in step
super().step()
File "/droidlet/craftassist/agent/../../base_agent/core.py", line 26, in step
self.controller_step()
File "/droidlet/craftassist/agent/../../base_agent/loco_mc_agent.py", line 292, in controller_step
self.dialogue_manager.step(incoming_chats[0])
File "/droidlet/craftassist/agent/../../base_agent/dialogue_manager.py", line 100, in step
self.dialogue_stack.step()
File "/droidlet/craftassist/agent/../../base_agent/dialogue_stack.py", line 54, in step
output_chat, step_data = self.stack[-1].step()
File "/droidlet/craftassist/agent/../../base_agent/dialogue_objects/interpreter.py", line 103, in step
r = self.action_handlers[action_type](self.speaker, action_def)
File "/droidlet/craftassist/agent/../../craftassist/agent/dialogue_objects/mc_interpreter.py", line 513, in handle_dance
return new_tasks(), None, None
File "/droidlet/craftassist/agent/../../craftassist/agent/dialogue_objects/mc_interpreter.py", line 486, in new_tasks
dance_memid = random.choice(dance_memids)
File "/usr/lib/python3.6/random.py", line 260, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
2021-04-09 03:16:23,773 [loco_mc_agent.py:202 - handle_exception() ERROR]: Default handler caught exception, db_log_idx=2404783
Traceback (most recent call last):
File "/droidlet/craftassist/agent/../../base_agent/core.py", line 18, in start
self.step()
File "/droidlet/craftassist/agent/../../base_agent/loco_mc_agent.py", line 226, in step
super().step()
File "/droidlet/craftassist/agent/../../base_agent/core.py", line 26, in step
self.controller_step()
File "/droidlet/craftassist/agent/../../base_agent/loco_mc_agent.py", line 292, in controller_step
self.dialogue_manager.step(incoming_chats[0])
File "/droidlet/craftassist/agent/../../base_agent/dialogue_manager.py", line 100, in step
self.dialogue_stack.step()
File "/droidlet/craftassist/agent/../../base_agent/dialogue_stack.py", line 54, in step
output_chat, step_data = self.stack[-1].step()
File "/droidlet/craftassist/agent/../../base_agent/dialogue_objects/interpreter.py", line 103, in step
r = self.action_handlers[action_type](self.speaker, action_def)
File "/droidlet/craftassist/agent/../../craftassist/agent/dialogue_objects/mc_interpreter.py", line 513, in handle_dance
return new_tasks(), None, None
File "/droidlet/craftassist/agent/../../craftassist/agent/dialogue_objects/mc_interpreter.py", line 486, in new_tasks
dance_memid = random.choice(dance_memids)
File "/usr/lib/python3.6/random.py", line 260, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
Traceback (most recent call last):
File "/droidlet/craftassist/agent/craftassist_agent.py", line 434, in
sa.start()
File "/droidlet/craftassist/agent/../../base_agent/core.py", line 20, in start
self.handle_exception(e)
File "/droidlet/craftassist/agent/../../base_agent/loco_mc_agent.py", line 221, in handle_exception
raise e
File "/droidlet/craftassist/agent/../../base_agent/core.py", line 18, in start
self.step()
File "/droidlet/craftassist/agent/../../base_agent/loco_mc_agent.py", line 226, in step
super().step()
File "/droidlet/craftassist/agent/../../base_agent/core.py", line 26, in step
self.controller_step()
File "/droidlet/craftassist/agent/../../base_agent/loco_mc_agent.py", line 292, in controller_step
self.dialogue_manager.step(incoming_chats[0])
File "/droidlet/craftassist/agent/../../base_agent/dialogue_manager.py", line 100, in step
self.dialogue_stack.step()
File "/droidlet/craftassist/agent/../../base_agent/dialogue_stack.py", line 54, in step
output_chat, step_data = self.stack[-1].step()
File "/droidlet/craftassist/agent/../../base_agent/dialogue_objects/interpreter.py", line 103, in step
r = self.action_handlers[action_type](self.speaker, action_def)
File "/droidlet/craftassist/agent/../../craftassist/agent/dialogue_objects/mc_interpreter.py", line 513, in handle_dance
return new_tasks(), None, None
File "/droidlet/craftassist/agent/../../craftassist/agent/dialogue_objects/mc_interpreter.py", line 486, in new_tasks
dance_memid = random.choice(dance_memids)
File "/usr/lib/python3.6/random.py", line 260, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
```
## Steps to reproduce
User's commands:
"dance"
Contributor guide
Assessment
This issue has not been assessed yet.