Skip to content

[DERCBOT-1887/1888] Create evaluation from dataset + Delete run#2048

Open
scezen wants to merge 6 commits into
theopenconversationkit:masterfrom
CreditMutuelArkea:feature/evaluation-from-dataset/DERCBOT-1887
Open

[DERCBOT-1887/1888] Create evaluation from dataset + Delete run#2048
scezen wants to merge 6 commits into
theopenconversationkit:masterfrom
CreditMutuelArkea:feature/evaluation-from-dataset/DERCBOT-1887

Conversation

@scezen
Copy link
Copy Markdown
Member

@scezen scezen commented Apr 30, 2026

No description provided.

@scezen scezen marked this pull request as draft April 30, 2026 08:29
@rkuffer rkuffer changed the title [DERCBOT-1887] Create evaluation from dataset + Delete run [DERCBOT-1887/1888] Create evaluation from dataset + Delete run Apr 30, 2026
@rkuffer rkuffer marked this pull request as ready for review May 5, 2026 10:09
Copy link
Copy Markdown
Member

@rkuffer rkuffer left a comment

Choose a reason for hiding this comment

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

Ok for the front part.
Thanks for the work

Copy link
Copy Markdown
Contributor

@assouktim assouktim left a comment

Choose a reason for hiding this comment

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

Revise the code design to use the existing API

val dataset = getDatasetEntity(namespace, botId, datasetId)
val run = getRunEntity(namespace, botId, dataset._id.toString(), runId)

if (run.state == DatasetRunState.QUEUED || run.state == DatasetRunState.RUNNING) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's best to filter out records with the “COMPLETED” status; otherwise, you'll also miss those with the “CANCELLED” status.

throw DatasetError.RunNotFinished(runId, run.state)
}

if (run.endTime == null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think that's necessary. It's redundant compared to the previous check.

return EvaluationSampleDTO.from(savedSample, evaluationsResult)
}

fun createEvaluationSampleFromRun(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The code is duplicated from the existing createEvaluationSample function. In principle, only the instantiation of the evaluation will change; the rest of the code remains unchanged.

}
}

blockingJsonPost(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can use the existing API instead of creating a new one, since the goal is to generate the evaluation using either the information from the dialogs or the information from the dataset run.

data class CreateEvaluationSampleRequest(
    val name: String?,
    val description: String?,
    val dialogInfo: DialogInfo?,
    val datasetRunInfo: DatasetRunInfo?,
)

data class DialogInfo(
    val dialogActivityFrom: Instant,
    val dialogActivityTo: Instant,
    val requestedDialogCount: Int,
    val allowTestDialogs: Boolean = false,
)

data class DatasetRunInfo(
    val runIds: List<String>
)

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.

3 participants