Example
Table of contents
Constructors
Methods
Constructors
constructor
• new EvaluationLogger(options): EvaluationLogger
Parameters
| Name | Type |
|---|---|
options | EvaluationLoggerOptions |
Returns
EvaluationLogger
Defined in
evaluationLogger.ts:554Methods
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.
Parameters
| Name | Type |
|---|---|
inputs | Record<string, any> |
output | any |
Returns
ScoreLogger
Example
Defined in
evaluationLogger.ts:641logPredictionAsync
▸ 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.
Parameters
| Name | Type |
|---|---|
inputs | Record<string, any> |
output | any |
Returns
Promise<ScoreLogger>
Example
Defined in
evaluationLogger.ts:666logSummary
▸ 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.
Parameters
| Name | Type |
|---|---|
summary? | Record<string, any> |
Returns
Promise<void>