{"id":14181801,"url":"https://github.com/lyuqin/HydraNet-WikiSQL","last_synced_at":"2025-08-07T14:31:36.654Z","repository":{"id":52507618,"uuid":"283581252","full_name":"lyuqin/HydraNet-WikiSQL","owner":"lyuqin","description":"Code and trained model for Hybrid ranking network for text-to-SQL on WikiSQL","archived":false,"fork":false,"pushed_at":"2023-12-20T21:10:52.000Z","size":18,"stargazers_count":65,"open_issues_count":3,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-18T11:13:39.371Z","etag":null,"topics":["nl2sql","text-to-sql","wikisql"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2008.04759","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyuqin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-29T19:08:43.000Z","updated_at":"2024-06-27T05:36:40.000Z","dependencies_parsed_at":"2024-08-18T11:12:13.909Z","dependency_job_id":"ea0c338d-7766-4d7c-a0d9-0a588891b4e2","html_url":"https://github.com/lyuqin/HydraNet-WikiSQL","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyuqin%2FHydraNet-WikiSQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyuqin%2FHydraNet-WikiSQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyuqin%2FHydraNet-WikiSQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyuqin%2FHydraNet-WikiSQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyuqin","download_url":"https://codeload.github.com/lyuqin/HydraNet-WikiSQL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229052492,"owners_count":18012562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nl2sql","text-to-sql","wikisql"],"created_at":"2024-08-18T11:04:13.779Z","updated_at":"2024-12-10T11:30:17.895Z","avatar_url":"https://github.com/lyuqin.png","language":"Python","funding_links":[],"categories":["💬 Classic Model"],"sub_categories":[],"readme":"# Hybrid Ranking Network for Text-to-SQL\nCode for our paper [Hybrid Ranking Network for Text-to-SQL](https://arxiv.org/abs/2008.04759) \n\n## Environment Setup\n\n* `Python 3.8`\n* `Pytorch 1.7.1` or higher\n* `pip install -r requirements.txt`\n\nWe can also run experiments with docker image:\n`docker build -t hydranet -f Dockerfile .`\n\nThe built image above contains processed data and is ready for training and evaluation.\n\n## Data Preprocessing\n1. Create data folder and output folder first: `mkdir data \u0026\u0026 mkdir output`\n2. Clone WikiSQL repo: \n`git clone https://github.com/salesforce/WikiSQL \u0026\u0026 tar xvjf WikiSQL/data.tar.bz2 -C WikiSQL`\n3. Preprocess data:\n`python wikisql_gendata.py`\n   \n## Training\n1. Run `python main.py train --conf conf/wikisql.conf --gpu 0,1,2,3 --note \"some note\"`.\n2. Model will be saved to `output` folder, named by training start datetime.\n\n## Evaluation\n1. Modify model, input and output settings in `wikisql_prediction.py` and run it.\n2. Run WikiSQL evaluation script to get official numbers: `cd WikiSQL \u0026\u0026 python evaluate.py data/test.jsonl data/test.db ../output/test_out.jsonl`\n\nNote: the WikiSQL evaluation script will encounter error when running in Windows system. Hence we included the fixed version for Windows User (run in root folder): `python wikisql_evaluate.py WikiSQL/data/test.jsonl WikiSQL/data/test.db output/test_out.jsonl`\n\n\n## Trained Model\nTrained model that can reproduce reported number on WikiSQL leaderboard is attached in the releases (see under \"Releases\" in the right column). Model prediction outputs are also attached.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyuqin%2FHydraNet-WikiSQL","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyuqin%2FHydraNet-WikiSQL","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyuqin%2FHydraNet-WikiSQL/lists"}