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

insert human eval scores to clickhouse #163

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Conversation

dinmukhamedm
Copy link
Member

@dinmukhamedm dinmukhamedm commented Nov 6, 2024

Important

Inserts human evaluation scores into ClickHouse when Feature.FULL_BUILD is enabled, with new client and environment configurations.

  • Behavior:
    • Inserts human evaluation scores into ClickHouse in route.ts if Feature.FULL_BUILD is enabled.
    • Uses clickhouseClient to insert data into evaluation_scores table.
  • Environment:
    • Adds CLICKHOUSE_URL and CLICKHOUSE_USER to .env.local.example.
    • Updates docker-compose-full.yml and docker-compose-local-build.yml to include ClickHouse environment variables.
  • Dependencies:
    • Adds @clickhouse/client to package.json dependencies.
  • Client:
    • New clickhouseClient in client.ts configured for asynchronous inserts if Feature.FULL_BUILD is enabled.

This description was created by Ellipsis for a19833d. 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.

❌ Changes requested. Reviewed everything up to 76e7a98 in 1 minute and 6 seconds

More details
  • Looked at 114 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. frontend/app/api/projects/[projectId]/queues/[queueId]/remove/route.ts:20
  • Draft comment:
    Consider adding error handling for the database query operation to handle potential failures.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. frontend/app/api/projects/[projectId]/queues/[queueId]/remove/route.ts:27
  • Draft comment:
    Consider adding error handling for the database query operation to handle potential failures.
  • Reason this comment was not posted:
    Marked as duplicate.
3. frontend/app/api/projects/[projectId]/queues/[queueId]/remove/route.ts:44
  • Draft comment:
    Consider adding error handling for the database query operation to handle potential failures.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_m2fxoGvTC8SSFdkJ


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

}
});
if (evaluation && evaluationValues.length > 0) {
const result = await clickhouseClient.insert({
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding error handling for the ClickHouse insert operation to handle potential failures.

});
}
}

await db.insert(evaluationScores).values(evaluationValues);
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding error handling for the database insert operation to handle potential failures.

@@ -25,3 +25,6 @@ AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
S3_IMGS_BUCKET=

CLICKHOUSE_URL=http://localhost:8123
Copy link
Contributor

Choose a reason for hiding this comment

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

The CLICKHOUSE_URL constant is already defined in app-server/.env.example, docker-compose-full.yml, and docker-compose-local-build.yml. Consider reusing the existing configuration to avoid duplication.

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! Incremental review on 2d5184e in 25 seconds

More details
  • Looked at 56 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/.env.local.example:25
  • Draft comment:
    Consider adding CLICKHOUSE_URL and CLICKHOUSE_USER back to the .env.local.example file to ensure consistency with the docker-compose files and avoid potential errors.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The removal of CLICKHOUSE_URL and CLICKHOUSE_USER seems intentional due to the ENVIRONMENT=LITE setting, which disables ClickHouse dependencies. The comment does not provide strong evidence that these variables are still necessary. It seems speculative and not actionable, as the removal aligns with the current environment setting.
    I might be missing the context of how the docker-compose files are structured and whether they still require these variables. However, the current file setup suggests they are not needed.
    The presence of ENVIRONMENT=LITE strongly indicates that ClickHouse is not required, making the comment less relevant. Without evidence of a dependency, the comment should be removed.
    The comment should be deleted as it lacks strong evidence of necessity and seems speculative given the current environment setting.

Workflow ID: wflow_MwxDMaue1tQ0qKTq


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

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! Incremental review on a19833d in 11 seconds

More details
  • Looked at 35 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/lib/clickhouse/client.ts:8
  • Draft comment:
    The removal of the isFeatureEnabled(Feature.FULL_BUILD) check means the ClickHouse client will always be created with the async insert settings. Ensure this is the intended behavior, as it changes the previous conditional logic.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_1zLdI1Twi2nThVHm


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

@dinmukhamedm dinmukhamedm merged commit 6e4cc4e into dev Nov 6, 2024
1 check passed
@dinmukhamedm dinmukhamedm deleted the fix/human-eval-ch branch November 6, 2024 07:11
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