thu-coai / ConvLab-2

ConvLab-2: An Open-Source Toolkit for Building, Evaluating, and Diagnosing Dialogue Systems
Apache License 2.0
454 stars 131 forks source link

[BUG] Not training algorithms that use the 'UserPolicyAgendaMultiWoz' #86

Closed brunonishimoto closed 4 years ago

brunonishimoto commented 4 years ago

When training policies that use the UserPolicyAgendaMultiWoz such as PG, PPO and GDPL, it throws an Exception. This Exception is related to the file convlab2/task/multiwoz/goal_generator.py line 181, where the self.corpus_path seems to be None instead of a path. Indeed, in the UserPolicyAgendaMultiWozclass, we initialize the GoalGenerator with defaults values (corpus_path = None, included), and we do not set this anywhere.

To Reproduce Steps to reproduce an example of the behavior (PPO policy):

  1. Go to convlab2/policy/ppo
  2. Run python train.py
  3. It will throw an Exception as shown in the image below.

image

Expected behavior It should train the policy with the respective algorithm (PPO in this case)

Additional context It also happens when evaluating an policy using convlab2/policy/evaluate.py script.

brunonishimoto commented 4 years ago

I realized that the default goal_model_path in class GoalGenerator changed to data/multiwoz/goal/new_goal_model_no_police_hospital.pkl which does not exist in directory data/multiwoz/goal.

One possible solution is to run the script convlab2/task/multiwoz/goal_generator.py to create this model path.