shreyas231219/Meta-Pytorch-Openenv
0
SQL / Data Cleaning Sandbox
An OpenEnv-compliant environment where AI agents clean messy SQLite databases using SQL queries and Python code.
Overview
Tasks
Easy - Data Triage
Find the total revenue from the sales table for January 2024.Grader: Checks if the computed total matches the expected float value (1000.00).
Medium - Data Cleaning
Fix duplicate emails, NULL ages, and uppercase emails in the users table.Grader: Partial scoring:
- 0.3 for all emails lowercase
- 0.4 for no duplicate emails
- 0.3 for no NULL ages
Hard - Schema Migration
Normalizeflat_ordersintocustomers+orderstables with foreign keys.
Grader: Partial scoring:
- 0.2 for correct
customersschema - 0.2 for correct
ordersschema - 0.2 for 4 unique customers
- 0.2 for 6 orders migrated
- 0.2 for valid FK integrity
Quick Start
Local Development
- Clone and Install
# Clone the repository
git clone https://github.com/shreyas231219/Meta-Pytorch-Openenv.git
cd Meta-Pytorch-Openenv
# Install dependencies
pip install -e .- Run the Server The server will default to port 7860.
Bash (Linux/macOS):
TASK_ID=easy python -m server.appPowerShell (Windows):
$env:TASK_ID='easy'
python -m server.appDocker (Hugging Face Spaces Ready)
# Build
docker build -t sql-sandbox:latest .
# Run on HF Spaces default port 7860
docker run -p 7860:7860 sql-sandbox:latestBaseline Inference
Runs GPT-4o on all three tasks and prints reproducible scores.
# For local testing in PowerShell (Windows)
$env:HF_TOKEN='sk-...'
$env:MODEL_NAME='gpt-4o'
python inference.py --url http://localhost:7860Project Structure
.
├── Dockerfile # Root Dockerfile for HF Spaces
├── openenv.yaml # OpenEnv manifest (port 7860)
├── pyproject.toml # Package dependencies
├── inference.py # baseline inference script
├── inference_groq.py # groq inference script
├── README.md # This file
├── client.py # EnvClient helper
├── models.py # Action & Observation models
└── server/
├── app.py # FastAPI server entry point
└── environment.py # Core environment logic + graders