SimDial
SimDial copied to clipboard
Error while running multiple_domains.py
Traceback (most recent call last):
File "mtrand.pyx", line 1115, in mtrand.RandomState.choice
TypeError: 'dict_keys' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "multiple_domains.py", line 311, in <module>
gen_bot.gen_corpus("test", rest_spec, complexity.CleanSpec, test_size)
File "C:\Users\Mayank\Desktop\GithubProjects\SimDial\simdial\generator.py", line 146, in gen_corpus
corpus = self.gen(domain, complex, num_sess=size)
File "C:\Users\Mayank\Desktop\GithubProjects\SimDial\simdial\generator.py", line 108, in gen
usr = User(domain, complexity)
File "C:\Users\Mayank\Desktop\GithubProjects\SimDial\simdial\agent\user.py", line 76, in __init__
self.goal_cnt = np.random.choice(complexity.multi_goals.keys(), p=complexity.multi_goals.values())
File "mtrand.pyx", line 1117, in mtrand.RandomState.choice
ValueError: 'a' must be 1-dimensional or an integer
i had similar issues when using python2.7. try running it in python3+ using this forked repo: https://github.com/ruinunca/SimDial it worked for me.