-
Notifications
You must be signed in to change notification settings - Fork 60
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
Conversation
5c3321b
to
b89c5c6
Compare
b89c5c6
to
205a627
Compare
205a627
to
c8d0d36
Compare
--- 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; |
There was a problem hiding this comment.
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
@@ -58,7 +58,7 @@ export type LlmAsJudgeEvaluationMetadata = InferSelectModel< | |||
export type Subscription = InferSelectModel<typeof subscriptions> | |||
|
|||
export type EvaluationDto = Evaluation & { | |||
configuration?: LlmAsJudgeEvaluationMetadata['configuration'] | |||
configuration: LlmAsJudgeEvaluationMetadata['configuration'] | null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the null? isn't it supposed to be not null after your migration ☝🏼 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the original configuration
attribute from the evaluations
, not the new one in the LegacyMetadata
, so technically every value should be Null here now. This is just for compatibility while I'm doing changes and will be removed in the future.
Part 1.3
Perform the migration to move all configuration data from evaluations to evaluationMetadataLlmAsJudgeLegacy.