salesforce / simpletod

Official repository for "SimpleTOD: A Simple Language Model for Task-Oriented Dialogue"
https://arxiv.org/abs/2005.00796
BSD 3-Clause "New" or "Revised" License
235 stars 79 forks source link

demo , return q[-1] list index out of range - error #17

Open En-J-A opened 3 years ago

En-J-A commented 3 years ago

When I try to run the demo by

python demo.py gpt2 greedy

I got this output with the following error

(venv) D:\simpletod-master\simpletod-master>python demo.py gpt2 greedy

Loading Model

SimpleTOD is ready to chat. What would you like to ask?

You: hello, I need a cheap hotel

Traceback (most recent call last):
  File "D:\simpletod-master\simpletod-master\demo.py", line 696, in <module>
    domain = get_turn_domain(beliefs, domain_queue)
  File "D:\simpletod-master\simpletod-master\demo.py", line 587, in get_turn_domain
    return q[-1]
IndexError: list index out of range

when I tried to print the output line by line

I found that the belief_text and beliefs are empty :

   belief_text = get_belief_new_dbsearch(tmp_pred)
        print(belief_text)

        beliefs = convert_belief(belief_text)
        print(beliefs)

their values are:

 []
{}

Is there a problem with arguments?

wise-east commented 2 years ago

I have the same problem. Were you able to resolve this?

En-J-A commented 2 years ago

Unfortunately, no.

mohiitaa commented 1 year ago

Did you find a solution to this?