MiuLab / DDQ

Deep Dyna-Q: Integrating Planning for Task-Completion Dialogue Policy Learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Training with NLG + NLU error

randyhouse opened this issue · comments

Hello

I am trying to train your DDQ model with NLG + NLU on.
I ran the following command:

python run.py --agt 9 --usr 1 --max_turn 40 
	      --movie_kb_path ./deep_dialog/data/movie_kb.1k.p 
	      --dqn_hidden_size 80 --experience_replay_pool_size 5000 
	      --episodes 500 
	      --simulation_epoch_size 100 
	      --run_mode 3 
	      --act_level 1
	      --slot_err_prob 0.0 
	      --intent_err_prob 0.00 
	      --batch_size 16 
	      --goal_file_path ./deep_dialog/data/user_goals_first_turn_template.part.movie.v1.p 
	      --warm_start 1 --warm_start_epochs 100 
	      --planning_steps 9 
	      --write_model_dir ./deep_dialog/checkpoints/DDQAgent
	      --torch_seed 100
	      --grounded 0
	      --boosted 1
	      --train_world_model 1

But I received this error during the warm_start phase:


Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1668, in <module>
    main()
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1662, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1072, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "run.py", line 535, in <module>
    run_episodes(num_episodes, status)
  File "run.py", line 458, in run_episodes
    warm_start_simulation()
  File "run.py", line 408, in warm_start_simulation
    episode_over, reward = dialog_manager.next_turn()
  File "deep_dialog/dialog_system/dialog_manager.py", line 117, in next_turn
    self.user_action)
  File "deep_dialog/usersims/usersim_model.py", line 304, in register_experience_replay_tuple
    action_idx = self.action_index(copy.deepcopy(user_a_t))
  File "deep_dialog/usersims/usersim_model.py", line 292, in action_index
    raise Exception("action index not found")
Exception: action index not found


It looks like when the user says the following, it is not inside the self.feasible_actions_users, do you know what is going on?


after: {'request_slots': {}, 'nl': 'I want to watch avengers.', 'turn': 2, 'diaact': 'request', 'inform_slots': {'moviename': 'avengers'}}
Turn 2 usr: request, inform_slots: {'moviename': 'avengers'}, request_slots: {}
Turn 2 usr: I want to watch avengers.

Thanks for this feedback.

The intent of NLU is wrong here, it should be an inform action. Just fixed it. You can check out the latest code.

Thanks

Hello @xjli, thanks for your reply.

I just git pull the latest code, and re-ran the command above, I received this the same error, but now, the error occurs at:

{'request_slots': {'ticket': 'UNK'}, 'inform_slots': {'numberofpeople': 'PLACEHOLDER'}, 'diaact': 'request'}

Thanks, let me check NLU part. The NLU is quite brittle.

You can run the code without NLU (--act_level 0) first.
I will let you know when we fix it.

Thanks

@randyhouse , I fixed the bugs in act_level = 1 mode.

You can check out the latest code.

Thanks so much,