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

Feature: Run evaluations in batch #154

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

geclos
Copy link
Collaborator

@geclos geclos commented Sep 9, 2024

This commit implements evaluation runs in batch.

@geclos geclos marked this pull request as draft September 9, 2024 22:34
@geclos geclos force-pushed the feature/run_evaluations_in_batch branch from 06b22b1 to 36f3ab5 Compare September 9, 2024 22:40
@geclos geclos force-pushed the feature/run_evaluations_in_batch branch from 36f3ab5 to 0f5b6b4 Compare September 10, 2024 08:12
@geclos geclos marked this pull request as ready for review September 10, 2024 08:12
@geclos geclos force-pushed the feature/run_evaluations_in_batch branch 2 times, most recently from 10192db to 73ac5bf Compare September 10, 2024 08:22
import { DatasetsRepository } from '@latitude-data/core/repositories'
import { previewDataset } from '@latitude-data/core/services/datasets/preview'
import disk from '$/lib/disk'
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason to do this?. For using in jobs? I think if you manage to make it work is fine. But also fine that each app init their own disk singleton

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we need it in jobs yes

@geclos geclos force-pushed the feature/run_evaluations_in_batch branch 3 times, most recently from 4b7c2b5 to 54de4ca Compare September 10, 2024 10:35
runCount: z.number(),
offset: z.number().optional().default(0),
parameters: z.record(z.number()).optional(),
evaluationId: z.number(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't be this an array?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes

@geclos geclos force-pushed the feature/run_evaluations_in_batch branch from 54de4ca to 3ce881d Compare September 10, 2024 12:03
documentUuid: z.string(),
commitUuid: z.string(),
runCount: z.number(),
offset: z.number().optional().default(0),
Copy link
Contributor

Choose a reason for hiding this comment

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

Also limit no?

Copy link
Contributor

Choose a reason for hiding this comment

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

And also a boolean to pick all the rows
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's gonna be fromLine and toLine btw

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And also a boolean to pick all the rows

better to handle this in frontend, don't send the limits to the backend if the users wants everything

@geclos geclos force-pushed the feature/run_evaluations_in_batch branch 12 times, most recently from 22f0958 to e696e1e Compare September 10, 2024 16:55
commitUuid: z.string(),
runCount: z.number(),
offset: z.number().optional().default(0),
parameters: z.record(z.number()).optional(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this a record of numbers?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it maps parameters to the index column of rows in a csv, are you doing it differently in frontend?

Copy link
Contributor

Choose a reason for hiding this comment

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

But you also need the name of the parameters in the documents no? It's a map between document params and csv headers or I'm missunderstanding?
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes the key is the parameter name and the value is the column index

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

so in this case let's assume the csv has last_name and name in columns 3 and 4, the parameters map would be

{ last_name: 3, name: 4} the keys being the document parameters and the values being the csv collumn indeces

Copy link
Contributor

Choose a reason for hiding this comment

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

It's true, headers is an array 👍

@geclos geclos force-pushed the feature/run_evaluations_in_batch branch 4 times, most recently from 68e20e4 to 3cc826e Compare September 10, 2024 21:15
@geclos geclos force-pushed the feature/run_evaluations_in_batch branch from 3cc826e to f43b471 Compare September 10, 2024 21:17
@geclos geclos merged commit 4b6b349 into main Sep 10, 2024
3 checks passed
@geclos geclos deleted the feature/run_evaluations_in_batch branch September 10, 2024 21:24
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.

2 participants