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

store evals in flattened table #120

Merged
merged 1 commit into from
Nov 1, 2024
Merged

store evals in flattened table #120

merged 1 commit into from
Nov 1, 2024

Conversation

dinmukhamedm
Copy link
Member

@dinmukhamedm dinmukhamedm commented Nov 1, 2024

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 b5cfe38. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to b5cfe38 in 1 minute and 5 seconds

More details
  • Looked at 2823 lines of code in 9 files
  • Skipped 1 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. app-server/src/api/v1/evaluations.rs:70
  • Draft comment:
    The change from ids to &ids in the function call to from_evaluation_datapoint_results is a good optimization. It avoids unnecessary cloning of the ids vector, improving performance.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The PR modifies the function signature of from_evaluation_datapoint_results to take a reference to result_ids instead of consuming it. This is a good change as it avoids unnecessary cloning and is more efficient.
2. app-server/src/ch/evaluation_scores.rs:29
  • Draft comment:
    The change from result_ids: Vec<Uuid> to result_ids: &Vec<Uuid> is a good optimization. It avoids unnecessary cloning of the result_ids vector, improving performance.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The PR changes the result_ids parameter in from_evaluation_datapoint_results to be a reference. This is a good change as it avoids unnecessary cloning and is more efficient.
3. app-server/src/api/v1/evaluations.rs:73
  • Draft comment:
    The change from ids to &ids in the function call to from_evaluation_datapoint_results is a good optimization. It avoids unnecessary cloning of the ids vector, improving performance.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The PR changes the result_ids parameter in from_evaluation_datapoint_results to be a reference. This is a good change as it avoids unnecessary cloning and is more efficient.
4. app-server/src/db/evaluations.rs:133
  • Draft comment:
    The change from ids to &ids in the function call to from_evaluation_datapoint_results is a good optimization. It avoids unnecessary cloning of the ids vector, improving performance.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The PR changes the result_ids parameter in from_evaluation_datapoint_results to be a reference. This is a good change as it avoids unnecessary cloning and is more efficient.
5. app-server/src/routes/evaluations.rs:11
  • Draft comment:
    The change from ids to &ids in the function call to from_evaluation_datapoint_results is a good optimization. It avoids unnecessary cloning of the ids vector, improving performance.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The PR changes the result_ids parameter in from_evaluation_datapoint_results to be a reference. This is a good change as it avoids unnecessary cloning and is more efficient.
6. frontend/lib/db/migrations/0001_reflective_nuke.sql:16
  • Draft comment:
    The change from ids to &ids in the function call to from_evaluation_datapoint_results is a good optimization. It avoids unnecessary cloning of the ids vector, improving performance.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The PR changes the result_ids parameter in from_evaluation_datapoint_results to be a reference. This is a good change as it avoids unnecessary cloning and is more efficient.

Workflow ID: wflow_PZgsbx50ZWONmsdl


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@dinmukhamedm dinmukhamedm merged commit e03b2e6 into dev Nov 1, 2024
1 check passed
@dinmukhamedm dinmukhamedm deleted the eval-scores branch November 1, 2024 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant