pub struct EvalRepo { /* private fields */ }Implementations§
Source§impl EvalRepo
impl EvalRepo
pub fn new(pool: PgPool) -> Self
pub async fn insert(&self, run: &EvalRun) -> Result<EvalRun>
pub async fn find_by_id(&self, id: Uuid) -> Result<EvalRun>
Sourcepub async fn update_opt_tracking(
&self,
id: Uuid,
status: &str,
rounds: i32,
best_score: Option<f64>,
best_agent_id: Option<Uuid>,
) -> Result<()>
pub async fn update_opt_tracking( &self, id: Uuid, status: &str, rounds: i32, best_score: Option<f64>, best_agent_id: Option<Uuid>, ) -> Result<()>
Update the iterative optimization loop tracking state on an eval run.
pub async fn update_status( &self, id: Uuid, status: &EvalRunStatus, ) -> Result<()>
pub async fn update_progress( &self, id: Uuid, completed: u32, errors: u32, ) -> Result<()>
pub async fn save_scores( &self, id: Uuid, scores: &DimensionScores, aggregate_score: f64, pass_rate: f64, failure_clusters: &[FailureClusterSummary], ) -> Result<()>
pub async fn list_by_agent( &self, agent_id: Uuid, limit: i64, ) -> Result<Vec<EvalRun>>
pub async fn list_all(&self, limit: i64, offset: i64) -> Result<Vec<EvalRun>>
pub async fn save_error(&self, id: Uuid, message: &str) -> Result<()>
Sourcepub async fn set_error_message(&self, id: Uuid, message: &str) -> Result<()>
pub async fn set_error_message(&self, id: Uuid, message: &str) -> Result<()>
Set the run-level error_message without changing status. Used to surface a sample trace failure reason on runs that completed but had all (or partial) traces erroring due to LLM API issues.
Sourcepub async fn cancel_or_delete(&self, id: Uuid) -> Result<bool>
pub async fn cancel_or_delete(&self, id: Uuid) -> Result<bool>
Cancel a run that is still pending/running, or hard-delete a completed/errored run.
Returns true if a row was affected, false if the ID did not exist.
Auto Trait Implementations§
impl !RefUnwindSafe for EvalRepo
impl !UnwindSafe for EvalRepo
impl Freeze for EvalRepo
impl Send for EvalRepo
impl Sync for EvalRepo
impl Unpin for EvalRepo
impl UnsafeUnpin for EvalRepo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more