Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simpler evaluations part 1.3 #515

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 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,11 @@
--- 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;
Comment on lines +1 to +11
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving configuration from evaluations to llm_as_judge_evaluation_metadatas, and then removing the llm_as_judge_evaluation_metadatas that were left over after removing their original evaluations

Loading
Loading