-
Notifications
You must be signed in to change notification settings - Fork 73
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
datapoint count and truncate data #294
Conversation
* eval time progression (#210) * initial work to compare evals * remove unnecessary div * design --------- Co-authored-by: Din <[email protected]> * added datapoint count on dataset table * added types and empty check --------- Co-authored-by: Dinmukhamed Mailibay <[email protected]> Co-authored-by: skull8888888 <[email protected]> Co-authored-by: Din <[email protected]>
* truncate data in datapoints and eval-datapoints * added skeleton --------- Co-authored-by: Robert Kim <[email protected]>
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.
❌ Changes requested. Reviewed everything up to 247fc66 in 1 minute and 35 seconds
More details
- Looked at
341
lines of code in10
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. app-server/src/db/datapoints.rs:16
- Draft comment:
Changingdata
andtarget
fromValue
toString
inDatapointView
may lead to issues if the database still stores these fields as JSON. Ensure that the database schema and related logic are updated to reflect this change. - Reason this comment was not posted:
Comment did not seem useful.
2. frontend/app/api/projects/[projectId]/datasets/route.ts:55
- Draft comment:
Ensure that thedatapointsCount
field is correctly calculated and included in the dataset response. This field should accurately reflect the number of datapoints associated with each dataset. - Reason this comment was not posted:
Comment did not seem useful.
3. frontend/app/api/projects/[projectId]/evaluations/[evaluationId]/route.ts:42
- Draft comment:
TheSUBSTRING
function in SQL should start from index 1, not 0. Update the query toSUBSTRING(data::text, 1, 100)
andSUBSTRING(target::text, 1, 100)
to correctly truncate the data and target fields. - Reason this comment was not posted:
Marked as duplicate.
4. frontend/app/project/[projectId]/evaluations/[evaluationId]/page.tsx:73
- Draft comment:
TheSUBSTRING
function in SQL should start from index 1, not 0. Update the query toSUBSTRING(data::text, 1, 100)
andSUBSTRING(target::text, 1, 100)
to correctly truncate the data and target fields. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_5FnFREkTxU6x7oQ1
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.
"SELECT | ||
id, | ||
dataset_id, | ||
SUBSTRING(data::text, 0, 100) as data, |
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.
The SUBSTRING
function in SQL should start from index 1, not 0. Update the query to SUBSTRING(data::text, 1, 100)
and SUBSTRING(target::text, 1, 100)
to correctly truncate the data and target fields.
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.
Fine in postgres
@@ -7,6 +7,26 @@ import { db } from '@/lib/db/drizzle'; | |||
import { datasetDatapoints } from '@/lib/db/migrations/schema'; | |||
import { fetcher } from '@/lib/utils'; | |||
|
|||
export async function GET( |
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.
Consider adding authentication and authorization checks in the GET
method to ensure that only authorized users can access the datapoint data.
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.
Handled in middleware
Important
This PR truncates
data
andtarget
fields to 100 characters, adds datapoint counting, and updates frontend components to handle these changes.datapoints.rs
, changedata
andtarget
fields inDatapointView
fromValue
toString
.data
andtarget
to 100 characters inget_datapoints()
.count_datapoints()
function to count datapoints indatapoints.rs
.GET
method inroute.ts
to fetch a single datapoint by ID.GET
indatasets/route.ts
to includedatapointsCount
.DatasetPanel
to fetch and display datapoint details usingswr
.datasets.tsx
to displaydatapointsCount
in datasets table.dataset.tsx
to handle datapoint selection and display inDatasetPanel
.This description was created by for 247fc66. It will automatically update as commits are pushed.