Last active
November 3, 2025 14:18
-
-
Save ChakshuGautam/568530c7bbc21d54e8ffc8be31fbe388 to your computer and use it in GitHub Desktop.
Link 207 evaluations to evaluation run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Final cleanup and proper setup for evaluation run | |
| -- Step 1: Delete run #52 and all its evaluations | |
| DELETE FROM evaluations WHERE evaluation_run_id = 52; | |
| DELETE FROM evaluation_runs WHERE id = 52; | |
| -- Step 2: Create a COMPLETED run (bypasses automatic processing) | |
| INSERT INTO evaluation_runs ( | |
| name, | |
| description, | |
| hypothesis, | |
| dataset_ids, | |
| status, | |
| progress_percentage, | |
| user_id, | |
| created_at, | |
| updated_at, | |
| completed_at | |
| ) | |
| VALUES ( | |
| 'Hindi OCR - Baseline (207 Test Cases)', | |
| 'Pre-computed machine OCR results (91.42% avg accuracy)', | |
| 'Baseline machine OCR performance on Hindi assessment images', | |
| '{51}'::int[], | |
| 'completed', | |
| 100, | |
| 'local-dev-user', | |
| NOW(), | |
| NOW(), | |
| NOW() | |
| ); | |
| -- Step 3: Get the new run ID (will be 53 or higher) | |
| -- Copy this ID for the next step | |
| SELECT id, name, status FROM evaluation_runs | |
| WHERE name LIKE 'Hindi OCR - Baseline%' | |
| ORDER BY id DESC LIMIT 1; | |
| -- Step 4: Link the 207 original evaluations | |
| -- REPLACE 53 with the actual ID from step 3 | |
| UPDATE evaluations | |
| SET evaluation_run_id = ( | |
| SELECT id FROM evaluation_runs | |
| WHERE name = 'Hindi OCR - Baseline (207 Test Cases)' | |
| LIMIT 1 | |
| ) | |
| WHERE prompt_version_id = 46 | |
| AND DATE(created_at) = '2025-11-03' | |
| AND evaluation_run_id IS NULL; | |
| -- Step 5: Verify the setup | |
| SELECT | |
| er.id as run_id, | |
| er.name as run_name, | |
| er.status, | |
| er.progress_percentage, | |
| COUNT(e.id) as evaluation_count | |
| FROM evaluation_runs er | |
| LEFT JOIN evaluations e ON e.evaluation_run_id = er.id | |
| WHERE er.name LIKE 'Hindi OCR - Baseline%' | |
| GROUP BY er.id, er.name, er.status, er.progress_percentage | |
| ORDER BY er.id DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment