Skip to main content
EvaluationLogger enables incremental logging of predictions and scores. Unlike the traditional Evaluation class which requires upfront dataset and batch processing, EvaluationLogger allows you to log predictions as they happen, with flexible scoring. Defined in: src/evaluationLogger.ts:556

Example

Constructors

Constructor

new EvaluationLogger(options): EvaluationLogger
Defined in: src/evaluationLogger.ts:575

Parameters

options
attributes?
Record<string, any>
dataset?
string | Dataset<DatasetRow>
description?
string
model?
WeaveObject | { name?: string; }
name
string
scorers?
string[]

Returns

EvaluationLogger

Methods

logPrediction()

logPrediction(inputs, output): ScoreLogger
Log a prediction with its input and output (synchronous version). Creates a predict_and_score call (with child predict call). Returns a ScoreLogger immediately for adding scores. This method returns the ScoreLogger synchronously. Operations on the ScoreLogger (logScore, finish) will be queued and executed when initialization completes. Defined in: src/evaluationLogger.ts:663

Parameters

inputs
Record<string, any>
output
any

Returns

ScoreLogger

Example


logPredictionAsync()

logPredictionAsync(inputs, output): Promise<ScoreLogger>
Log a prediction with its input and output (async version). Like logPrediction() but returns a Promise that resolves when the prediction call is fully initialized. Use this if you need to await the initialization before proceeding. Defined in: src/evaluationLogger.ts:688

Parameters

inputs
Record<string, any>
output
any

Returns

Promise<ScoreLogger>

Example


logSummary()

logSummary(summary?): Promise<void>
Log a summary and finalize the evaluation. Creates a summarize call and finishes the evaluate call. This method can be called without await (fire-and-forget), but internally it will wait for all pending operations to complete. Defined in: src/evaluationLogger.ts:789

Parameters

summary?
Record<string, any>

Returns

Promise<void>