shreyas231219 commited on
Commit
90b9423
Β·
verified Β·
1 Parent(s): 408aa90

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +116 -114
README.md CHANGED
@@ -1,114 +1,116 @@
1
- ---
2
- title: Meta-Pytorch-Openenv
3
- emoji: πŸ¦€
4
- colorFrom: blue
5
- colorTo: green
6
- sdk: docker
7
- app_port: 7860
8
- base_path: /web
9
- ---
10
- # SQL / Data Cleaning Sandbox
11
-
12
- An **OpenEnv**-compliant environment where AI agents clean messy SQLite databases
13
- using SQL queries and Python code.
14
-
15
- ## Overview
16
-
17
- | Feature | Details |
18
- |---|---|
19
- | **Interface** | `step()` / `reset()` / `state()` |
20
- | **Action space** | `{ tool: "sql" \| "python", command: "..." }` |
21
- | **Observation** | `{ output, error, current_step, max_steps, task_description }` |
22
- | **Reward** | 0.0 - 1.0 with **partial progress signals** |
23
- | **Tasks** | 3 (easy, medium, hard) |
24
-
25
- ## Tasks
26
-
27
- ### Easy - Data Triage
28
- > Find the total revenue from the `sales` table for January 2024.
29
-
30
- **Grader**: Checks if the computed total matches the expected float value (1000.00).
31
-
32
- ### Medium - Data Cleaning
33
- > Fix duplicate emails, NULL ages, and uppercase emails in the `users` table.
34
-
35
- **Grader**: Partial scoring:
36
- - 0.3 for all emails lowercase
37
- - 0.4 for no duplicate emails
38
- - 0.3 for no NULL ages
39
-
40
- ### Hard - Schema Migration
41
- > Normalize `flat_orders` into `customers` + `orders` tables with foreign keys.
42
-
43
- **Grader**: Partial scoring:
44
- - 0.2 for correct `customers` schema
45
- - 0.2 for correct `orders` schema
46
- - 0.2 for 4 unique customers
47
- - 0.2 for 6 orders migrated
48
- - 0.2 for valid FK integrity
49
-
50
- ## Quick Start
51
-
52
- ### Local Development
53
-
54
- 1. **Clone and Install**
55
- ```bash
56
- # Clone the repository
57
- git clone https://github.com/shreyas231219/Meta-Pytorch-Openenv.git
58
- cd Meta-Pytorch-Openenv
59
-
60
- # Install dependencies
61
- pip install -e .
62
- ```
63
-
64
- 2. **Run the Server**
65
- The server will default to port **7860**.
66
-
67
- **Bash (Linux/macOS):**
68
- ```bash
69
- TASK_ID=easy python -m server.app
70
- ```
71
-
72
- **PowerShell (Windows):**
73
- ```powershell
74
- $env:TASK_ID='easy'
75
- python -m server.app
76
- ```
77
-
78
- ### Docker (Hugging Face Spaces Ready)
79
-
80
- ```bash
81
- # Build
82
- docker build -t sql-sandbox:latest .
83
-
84
- # Run on HF Spaces default port 7860
85
- docker run -p 7860:7860 sql-sandbox:latest
86
- ```
87
-
88
- ## Baseline Inference
89
-
90
- Runs GPT-4o on all three tasks and prints reproducible scores.
91
-
92
- ```powershell
93
- # For local testing in PowerShell (Windows)
94
- $env:HF_TOKEN='sk-...'
95
- $env:MODEL_NAME='gpt-4o'
96
- python inference.py --url http://localhost:7860
97
- ```
98
-
99
- ## Project Structure
100
-
101
- ```
102
- .
103
- β”œβ”€β”€ Dockerfile # Root Dockerfile for HF Spaces
104
- β”œβ”€β”€ openenv.yaml # OpenEnv manifest (port 7860)
105
- β”œβ”€β”€ pyproject.toml # Package dependencies
106
- β”œβ”€β”€ inference.py # baseline inference script
107
- β”œβ”€β”€ inference_groq.py # groq inference script
108
- β”œβ”€β”€ README.md # This file
109
- β”œβ”€β”€ client.py # EnvClient helper
110
- β”œβ”€β”€ models.py # Action & Observation models
111
- └── server/
112
- β”œβ”€β”€ app.py # FastAPI server entry point
113
- └── environment.py # Core environment logic + graders
114
- ```
 
 
 
1
+ ---
2
+ title: Meta-Pytorch-Openenv
3
+ emoji: πŸ¦€
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: docker
7
+ app_port: 7860
8
+ base_path: /web
9
+ tags:
10
+ - openenv
11
+ ---
12
+ # SQL / Data Cleaning Sandbox
13
+
14
+ An **OpenEnv**-compliant environment where AI agents clean messy SQLite databases
15
+ using SQL queries and Python code.
16
+
17
+ ## Overview
18
+
19
+ | Feature | Details |
20
+ |---|---|
21
+ | **Interface** | `step()` / `reset()` / `state()` |
22
+ | **Action space** | `{ tool: "sql" \| "python", command: "..." }` |
23
+ | **Observation** | `{ output, error, current_step, max_steps, task_description }` |
24
+ | **Reward** | 0.0 - 1.0 with **partial progress signals** |
25
+ | **Tasks** | 3 (easy, medium, hard) |
26
+
27
+ ## Tasks
28
+
29
+ ### Easy - Data Triage
30
+ > Find the total revenue from the `sales` table for January 2024.
31
+
32
+ **Grader**: Checks if the computed total matches the expected float value (1000.00).
33
+
34
+ ### Medium - Data Cleaning
35
+ > Fix duplicate emails, NULL ages, and uppercase emails in the `users` table.
36
+
37
+ **Grader**: Partial scoring:
38
+ - 0.3 for all emails lowercase
39
+ - 0.4 for no duplicate emails
40
+ - 0.3 for no NULL ages
41
+
42
+ ### Hard - Schema Migration
43
+ > Normalize `flat_orders` into `customers` + `orders` tables with foreign keys.
44
+
45
+ **Grader**: Partial scoring:
46
+ - 0.2 for correct `customers` schema
47
+ - 0.2 for correct `orders` schema
48
+ - 0.2 for 4 unique customers
49
+ - 0.2 for 6 orders migrated
50
+ - 0.2 for valid FK integrity
51
+
52
+ ## Quick Start
53
+
54
+ ### Local Development
55
+
56
+ 1. **Clone and Install**
57
+ ```bash
58
+ # Clone the repository
59
+ git clone https://github.com/shreyas231219/Meta-Pytorch-Openenv.git
60
+ cd Meta-Pytorch-Openenv
61
+
62
+ # Install dependencies
63
+ pip install -e .
64
+ ```
65
+
66
+ 2. **Run the Server**
67
+ The server will default to port **7860**.
68
+
69
+ **Bash (Linux/macOS):**
70
+ ```bash
71
+ TASK_ID=easy python -m server.app
72
+ ```
73
+
74
+ **PowerShell (Windows):**
75
+ ```powershell
76
+ $env:TASK_ID='easy'
77
+ python -m server.app
78
+ ```
79
+
80
+ ### Docker (Hugging Face Spaces Ready)
81
+
82
+ ```bash
83
+ # Build
84
+ docker build -t sql-sandbox:latest .
85
+
86
+ # Run on HF Spaces default port 7860
87
+ docker run -p 7860:7860 sql-sandbox:latest
88
+ ```
89
+
90
+ ## Baseline Inference
91
+
92
+ Runs GPT-4o on all three tasks and prints reproducible scores.
93
+
94
+ ```powershell
95
+ # For local testing in PowerShell (Windows)
96
+ $env:HF_TOKEN='sk-...'
97
+ $env:MODEL_NAME='gpt-4o'
98
+ python inference.py --url http://localhost:7860
99
+ ```
100
+
101
+ ## Project Structure
102
+
103
+ ```
104
+ .
105
+ β”œβ”€β”€ Dockerfile # Root Dockerfile for HF Spaces
106
+ β”œβ”€β”€ openenv.yaml # OpenEnv manifest (port 7860)
107
+ β”œβ”€β”€ pyproject.toml # Package dependencies
108
+ β”œβ”€β”€ inference.py # baseline inference script
109
+ β”œβ”€β”€ inference_groq.py # groq inference script
110
+ β”œβ”€β”€ README.md # This file
111
+ β”œβ”€β”€ client.py # EnvClient helper
112
+ β”œβ”€β”€ models.py # Action & Observation models
113
+ └── server/
114
+ β”œβ”€β”€ app.py # FastAPI server entry point
115
+ └── environment.py # Core environment logic + graders
116
+ ```