Skip to content

Commit

Permalink
Simpler evaluations - part 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
csansoon committed Oct 29, 2024
1 parent 1b90b85 commit 5c3321b
Show file tree
Hide file tree
Showing 6 changed files with 3,006 additions and 7 deletions.
14 changes: 14 additions & 0 deletions packages/core/drizzle/0087_legacy_evaluations_part_2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- Migrate configuration column from "evaluations" to "llm_as_judge_evaluation_metadatas"
UPDATE "latitude"."llm_as_judge_evaluation_metadatas"
SET "configuration" = "latitude"."evaluations"."configuration"
FROM "latitude"."evaluations"
WHERE "latitude"."evaluations"."metadata_id" = "latitude"."llm_as_judge_evaluation_metadatas"."id";--> statement-breakpoint

--- Remove evaluation metadatas with NULL configuratios (these are llm_as_judge_evaluation_metadatas rows that were left when removing the original evaluation)
DELETE FROM "latitude"."llm_as_judge_evaluation_metadatas" WHERE "latitude"."llm_as_judge_evaluation_metadatas"."configuration" IS NULL--> statement-breakpoint

--- Set configuration column as NOT NULL
ALTER TABLE "latitude"."llm_as_judge_evaluation_metadatas" ALTER COLUMN "configuration" SET NOT NULL;--> statement-breakpoint

--- Drop the configuration column from evaluations
ALTER TABLE "latitude"."evaluations" DROP COLUMN IF EXISTS "configuration";
Loading

0 comments on commit 5c3321b

Please sign in to comment.