lmnr-ai / lmnr

Laminar - open-source all-in-one platform for engineering AI products. Crate data flywheel for you AI app. Traces, Evals, Datasets, Labels. YC S24.
https://www.lmnr.ai
Apache License 2.0
1.19k stars 60 forks source link

store evals in flattened table #120

Closed dinmukhamedm closed 1 month ago

dinmukhamedm commented 1 month ago

[!IMPORTANT] Introduce a new evaluation_scores table to store evaluation scores in a flattened format, updating related database schema, API endpoints, and data processing logic.

  • Database Changes:
    • Create new evaluation_scores table in 0001_reflective_nuke.sql for storing scores in a flattened format.
    • Remove score_names and average_scores columns from evaluations table.
    • Update evaluation_results table to make scores column nullable.
  • API Changes:
    • Update create_evaluation in evaluations.rs to handle new score storage.
    • Modify set_evaluation_results in db/evaluations.rs to insert scores into evaluation_scores.
    • Adjust get_evaluation_results to join with evaluation_scores.
  • Code Refactoring:
    • Add EvaluationScore struct and related functions in evaluation_scores.rs.
    • Update relations in relations.ts to include evaluationScores.
  • Miscellaneous:
    • Update schema.ts to reflect new database schema changes.
    • Add new relations for evaluationScores in relations.ts.

This description was created by Ellipsis for b5cfe38d8188970bc5974f7e44799d04f0492ac5. It will automatically update as commits are pushed.