SQLGym: A portable Gymnasium environment of SQLite database.
Project description
SQLGym
This is a portable Gymnasium environment of SQLite database. It is designed for platforms that are not able to use docker. (e.g. users without root privillege)
Setup
# Clone this repository
git clone https://github.com/KYLN24/sqlgym.git
# or via SSH
# git clone git@github.com:KYLN24/sqlgym.git
cd sqlgym
# Install this package
pip install .
Prepare Dataset
# Make a directory to save data
mkdir .data
cd .data
This project currently suppport the BIRD-SQL dataset.
mkdir bird
cd bird
# Download BIRD-SQL Dataset
wget -c https://bird-bench.oss-cn-beijing.aliyuncs.com/train.zip
unzip train.zip
cd train
unzip train_databases.zip
cd ..
wget -c https://bird-bench.oss-cn-beijing.aliyuncs.com/dev.zip
unzip dev.zip
cd dev
unzip dev_databases.zip
cd ..
Usage
from sqlgym import SqlGymEnv
from sqlgym.datasets import BirdDataset
dataset = BirdDataset(
bird_path=".data/bird",
mode="dev",
)
env = SqlGymEnv(dataset)
print(env.reset(0))
print(env.step(dataset[0].gt))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqlgym-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sqlgym-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82c90c892b7ecb550dde0173a5041207dcbace083beb61bdc6c69f5220b76e07
|
|
| MD5 |
3d3548addd9ebbbbc9d4c2465e23a1a7
|
|
| BLAKE2b-256 |
607f33a2083a24e81b50d48b7fc045699059401d568b36433c2b5db15a5d1632
|