Package dev.dokimos.server.service
Class EvalJobService
java.lang.Object
dev.dokimos.server.service.EvalJobService
Enqueues server-side judge jobs and reads the jobs registered for a run. Enqueuing transitions the
run to
RunStatus.EVALUATING so materialized pass-rate fields stay deferred until the worker
finishes scoring.-
Constructor Summary
ConstructorsConstructorDescriptionEvalJobService(EvalJobRepository jobRepository, ExperimentRunRepository runRepository, LlmConnectionRepository connectionRepository) -
Method Summary
Modifier and TypeMethodDescriptionenqueue(UUID runId, EnqueueJudgeRequest request, TenantScope scope) Enqueues a judge job for a run and moves the run into the evaluating state.getJobsForRun(UUID runId, TenantScope scope) Lists the judge jobs registered for a run, oldest first.
-
Constructor Details
-
EvalJobService
public EvalJobService(EvalJobRepository jobRepository, ExperimentRunRepository runRepository, LlmConnectionRepository connectionRepository)
-
-
Method Details
-
enqueue
@Transactional public EvalJobView enqueue(UUID runId, EnqueueJudgeRequest request, TenantScope scope) Enqueues a judge job for a run and moves the run into the evaluating state. The run row is locked for the transition so it serializes against item ingestion and completion.- Parameters:
runId- the run to scorerequest- the connection and evaluator configuration- Returns:
- the public view of the created job
- Throws:
IllegalArgumentException- if the run or connection does not exist (mapped to 404)IllegalStateException- if the run already has a job for this evaluator (mapped to 409)
-
getJobsForRun
Lists the judge jobs registered for a run, oldest first.- Throws:
IllegalArgumentException- if the run does not exist (mapped to 404)
-