Skip to main content
ScoreLogger manages scoring for a single prediction. Returned from EvaluationLogger.logPrediction(). Defined in: src/evaluationLogger.ts:330

Example

Constructors

Constructor

new ScoreLogger(evalLogger): ScoreLogger
Defined in: src/evaluationLogger.ts:338

Parameters

evalLogger
EvaluationLogger

Returns

ScoreLogger

Accessors

isFinishCalled

Get Signature

get isFinishCalled(): boolean
Check if finish() has been called. Used by EvaluationLogger to detect unfinished predictions. Defined in: src/evaluationLogger.ts:368
Returns
boolean

Methods

finish()

finish(): Promise<void>
Finish the scoring process for the prediction. Finalizes the predict_and_score call with accumulated scores. Updates incremental aggregates and frees memory. Defined in: src/evaluationLogger.ts:470

Returns

Promise<void>

logScore()

logScore(scorerName, score): Promise<void>
Log a score for this prediction. Creates a scorer call as a child of predict_and_score. Defined in: src/evaluationLogger.ts:379

Parameters

scorerName
string Name of the scorer (e.g., “accuracy”, “f1_score”)
score
any The score value

Returns

Promise<void>