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

How to execute my own queries? #50

Open
yaoyiyao-yao opened this issue Feb 21, 2021 · 3 comments
Open

How to execute my own queries? #50

yaoyiyao-yao opened this issue Feb 21, 2021 · 3 comments

Comments

@yaoyiyao-yao
Copy link

Hello,
If I want to test my own queries,what should I do?
Thank you very much.

@mattr1
Copy link

mattr1 commented Feb 23, 2021

The easiest approach is to create a dataset in the same format as the Spider development set (dev.json and associated tables.json, but with your questions and database schemas), and then run preprocessing and eval as you normally would for spider. The path to the dev set (dev.json) is in the .config file -- for simplicity you could just replace the spider dev with your own, but alternatively just extend the config file with one of your own that points to your custom questions instead.

@PedroEstevesPT
Copy link
Contributor

PedroEstevesPT commented Mar 14, 2021

Is there a script available to generate the .jsons given the question in NL and the database file ?

[UPDATE] - In fact, the process is straight forward. In case you want to run RAT-SQL on your own dataset the script needed to generate the .json files for the tables of the DB and for the query are not in this repository but in Spider dataset repo: https://github.com/taoyds/spider. So the easiest thing to do would be:

1 - Generate new_table.json , new.json using Spider script.
2 - Adding the new files in the libsonnet and running RAT-SQL pre-processing step.
3 - Performing inference as you would for a development set.

@neg-loss
Copy link

neg-loss commented Jun 14, 2022

I am able to create new_tables.json but while creating the new_dev.json how do I create the sql component for each query?
The sql component is not going to be given manually, right?
@Muradean Please guide?

[UPDATE] - I found the solution to above problem, one can follow the instructions given here

It worked for me.

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

4 participants