Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Running into Key Error for MNIST-Dialog implementation #9

Open
astha99 opened this issue Jan 31, 2023 · 2 comments
Open

Running into Key Error for MNIST-Dialog implementation #9

astha99 opened this issue Jan 31, 2023 · 2 comments
Assignees

Comments

@astha99
Copy link

astha99 commented Jan 31, 2023

Hello,

I am trying to reproduce the code for MNIST-Dialog and I keep getting an error.
Can you help me understand why this could probably be happening?

    text = output_pool[key]
KeyError: 'ques_attended'
@satwikkottur
Copy link
Contributor

Hello @astha99 ,

Just to double check, is this error in models_mnist/executor.py?

199     key = 'ques_attended'
200     if params['train_mode']:
201       text = output_pool[key]

If yes, could you please add a python debugger and print the value of output_pool at that point?

199     key = 'ques_attended'
200     if params['train_mode']:
201       import pdb; pdb.set_trace(); print(output_pool)
202       text = output_pool[key]

@satwikkottur satwikkottur self-assigned this Feb 28, 2023
@astha99
Copy link
Author

astha99 commented Mar 2, 2023

Thank you @satwikkottur for your response. Yes, that error was in executor.py. However, I am not able to reproduce that error. That error came up after I resolved this one with the help of an earlier issue.

 File "/home/astha/finalcorefnmn/models_mnist/generator.py", line 112, in __init__
    outputs['prog_pred_loss'] = outputs['ques_prog_loss']
KeyError: 'ques_prog_loss'

So, I added a python debugger to print the value of outputs which gives:

{}
> /home/astha/finalcorefnmn/models_mnist/generator.py(113)__init__()
-> outputs['prog_pred_loss'] = outputs['ques_prog_loss']

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants