Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Understanding generated Dialogues #15

Closed
ahtsham58 opened this issue Apr 28, 2020 · 1 comment
Closed

Understanding generated Dialogues #15

ahtsham58 opened this issue Apr 28, 2020 · 1 comment

Comments

@ahtsham58
Copy link

Hi,

I trained the system successfully this is what i get as output.
image

i tried to use your given line of code to get movie ids in the sentences but it did not work for me. I added a line return Output(list(map(str, return_dict["scores"].argmax(dim=1).tolist()))) at the end of eval_step in this file https://github.com/THUDM/KBRD/blob/master/parlai/agents/kbrd/kbrd.py and then run python scripts/display_model.py -t redial -mf saved/both_rgcn_0 -dt test.
image

My goal is to get movie ids within dialogue sentences. please guide ..
Secondly, I want to understand the dialogue flow. Like what is candidate label, eval lable etc.

looking forward to your positive response

@qibinc
Copy link
Collaborator

qibinc commented May 30, 2020

Edit: maintaining for future reference of the same question:

1. Dialog flow format.
The ParlAI lib is quite rigorous on the output format so we actually hacked a bit to display the information we want to see.

[redial]: dialog history
[label_candidates]: turn | mentioned movies | target movies | mentioned entities | ground truth response
[eval_labels]: ground truth response
[KbrdAgent]: predicted movie id to fit in the ground truth response.

2. Dialog contents & movie ids
Note that the both_rgcn_0 model is just the recommender part so the prediction [KbrdAgent] here is just the movieId. You can lookup the corresponding movie by movieId in `data/redial/entity2entityID.pkl`. 

To see the generated dialog sentences you need to run display_model on the transformer model (after running bash scripts/t2t_rec_rgcn.sh). 

@qibinc qibinc closed this as completed May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants