nitishgupta / nmn-drop

Neural Module Network for Reasoning over Text, ICLR 2020
122 stars 14 forks source link

Get the operation extracted from the question only #4

Closed minhson-kaist closed 4 years ago

minhson-kaist commented 4 years ago

Hi, First, I want to thank you for publishing a great paper with code. I have a question in terms of the operation. Can I get the operation results instead of the answers? I mean the operation extracted from each question.

Thanks,

nitishgupta commented 4 years ago

Thank you, that you liked our paper and hopefully find the code useful.

If I understand your question correctly, you want to be able to access intermediate outputs of the modules in a program? I added this functionality in the drop_demo_predictor

The key "program_execution" has exactly the information you're looking for.

allennlp predict \
    --output-file output.jsonl \
    --predictor drop_demo_predictor \
    --include-package semqa \
    --silent \
    --batch-size 1 \ 
    --overrides "{\"model\": { \"debug\":true}}" \
    resources/iclr_cameraready/ckpt/model.tar.gz \
    input.jsonl
minhson-kaist commented 4 years ago

Great. Thanks for your reply.