Code for our paper Hybrid Ranking Network for Text-to-SQL
Python3.7
Pytorch 1.3.1
or higher
Once Python and Pytorch is installed, run pip install -r requirements.txt
to install dependent Python packages.
- Download WikiSQL data to
data/wikisql
folder, and runpython wikisql_gendata.py
to preprocess data. - Run
python main.py train --conf conf/wikisql.conf --gpu 0,1,2,3 --note "some note"
. - Model will be saved to
output
folder, named by training start datetime.
- Modify model, input and output settings in
wikisql_prediction.py
and run it. - Run WikiSQL evaluation script to get official numbers.
Trained model that can generate reported number on WikiSQL leaderboard is available here.