brunnurs / valuenet

ValueNet: A Neural Text-to-SQL Architecture Incorporating Values
Apache License 2.0
66 stars 23 forks source link

error while executing some natural language queries in manual_inference.py #6

Open neerajbhat98 opened 4 years ago

neerajbhat98 commented 4 years ago

I'm using the school_finance database for manual inference and a model that I have trained. Here is a snapshot of the table in the database which I'm querying. image

Question: what is the amount of donation given by Monte plata?

Error:

image After carefully analyzing the code, step by step, I found out that the results variable in _inference_semql() [manual_inference.py] has no element. However, in the same function, we are trying to access results[0].actions. Can you help me out here? What is wrong and how to solve this?

Thanks in advance!

brunnurs commented 3 years ago

Hi @neerajbhat98 and sorry for my late response. The error you are facing simply means that the decoder network was not able to decode at least one full result. This will e.g. be the case if the SemQL tree is not finished in a sufficient number of steps.

What's exactly the reason for this result is hard to say - i can e.g. reproduce it when I enter gibberish instead of proper English text. But it could also be that the training of your model was not successful.