> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-typedoc-upgrade.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ScoreLogger

> TypeScript SDK reference

Defined in: [src/evaluationLogger.ts:330](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/evaluationLogger.ts#L330)

ScoreLogger manages scoring for a single prediction.
Returned from EvaluationLogger.logPrediction().

## Example

```ts twoslash theme={null}
// @noErrors
const pred = await ev.logPrediction(example, output);
await pred.logScore("accuracy", 0.95);
await pred.logScore("relevance", 0.8);
await pred.finish(); // Finalizes the prediction
```

## Constructors

### Constructor

> **new ScoreLogger**(`evalLogger`): `ScoreLogger`

Defined in: [src/evaluationLogger.ts:338](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/evaluationLogger.ts#L338)

#### Parameters

##### evalLogger

[`EvaluationLogger`](./evaluationlogger)

#### Returns

`ScoreLogger`

## Accessors

### isFinishCalled

#### Get Signature

> **get** **isFinishCalled**(): `boolean`

Defined in: [src/evaluationLogger.ts:368](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/evaluationLogger.ts#L368)

Check if finish() has been called.
Used by EvaluationLogger to detect unfinished predictions.

##### Returns

`boolean`

## Methods

### finish()

> **finish**(): `Promise`\<`void`>

Defined in: [src/evaluationLogger.ts:470](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/evaluationLogger.ts#L470)

Finish the scoring process for the prediction.
Finalizes the predict\_and\_score call with accumulated scores.
Updates incremental aggregates and frees memory.

#### Returns

`Promise`\<`void`>

***

### logScore()

> **logScore**(`scorerName`, `score`): `Promise`\<`void`>

Defined in: [src/evaluationLogger.ts:379](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/evaluationLogger.ts#L379)

Log a score for this prediction.
Creates a scorer call as a child of predict\_and\_score.

#### Parameters

##### scorerName

`string`

Name of the scorer (e.g., "accuracy", "f1\_score")

##### score

`any`

The score value

#### Returns

`Promise`\<`void`>
