GithubHelp home page GithubHelp logo

Comments (3)

whwang299 avatar whwang299 commented on July 30, 2024

Hi @vincentlux

This might happen due to instability of DBEngine class which activates except in following code.

def get_cnt_x_list(engine, tb, g_sc, g_sa, g_sql_i, pr_sc, pr_sa, pr_sql_i):
cnt_x1_list = []
g_ans = []
pr_ans = []
for b in range(len(g_sc)):
g_ans1 = engine.execute(tb[b]['id'], g_sc[b], g_sa[b], g_sql_i[b]['conds'])
# print(f'cnt: {cnt}')
# print(f"pr_sql_i: {pr_sql_i[b]['conds']}")
try:
pr_ans1 = engine.execute(tb[b]['id'], pr_sc[b], pr_sa[b], pr_sql_i[b]['conds'])
if bool(pr_ans1): # not empty due to lack of the data from incorretly generated sql
if g_ans1 == pr_ans1:
cnt_x1 = 1
else:
cnt_x1 = 0
else:
cnt_x1 = 0
except:
# type error etc... Execution-guided decoding may be used here.
pr_ans1 = None
cnt_x1 = 0
cnt_x1_list.append(cnt_x1)
g_ans.append(g_ans1)
pr_ans.append(pr_ans1)

DBEngine class is modified from SQLNet code which is based on original WikiSQL evaluation code (I guess).

I'll check whether this still happens when DBEngine from WikiSQL evaluation code is employed.

Thanks!

Wonseok

from sqlova.

vincentlux avatar vincentlux commented on July 30, 2024

Hi Wonseok,

Thanks for the quick response! This is interesting and I will also check with using the option you suggested. Thanks!

from sqlova.

whwang299 avatar whwang299 commented on July 30, 2024

@vincentlux I found the problem. It is caused by the wrong ordering of predicted where-column.

For example, when the ground truth is
{'sel': 1, 'conds': [[6, 0, 'at&t center 18,797'], [0, 2, 57]], 'agg': 0}
the previous prediction in train function could be
{'agg': 0, 'sel': 1, 'conds': [[0, 0, 'at&t center 18,797'], [6, 2, '57']]}

Hence, the execution accuracy of the model over train-set returned from the train function has been under-estimated.
During the test, there is no problem as this issue is caused by the use of ground-truth during the training which makes the debugging difficult.

I have updated the code. Please let me know if the problem still happens.

Wonseok

from sqlova.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.