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

# Class: ScoreLogger

> TypeScript SDK reference

[weave](../) / ScoreLogger

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

`Example`

```ts theme={null}
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
```

## Table of contents

### Constructors

* [constructor](./ScoreLogger#constructor)

### Methods

* [finish](./ScoreLogger#finish)
* [logScore](./ScoreLogger#logscore)

## Constructors

### constructor

• **new ScoreLogger**(`predMeta`, `evalLogger`): [`ScoreLogger`](./ScoreLogger)

#### Parameters

| Name         | Type                                     |
| :----------- | :--------------------------------------- |
| `predMeta`   | `PredictAndScoreCallMetadata`            |
| `evalLogger` | [`EvaluationLogger`](./EvaluationLogger) |

#### Returns

[`ScoreLogger`](./ScoreLogger)

#### Defined in

[evaluationLogger.ts:317](https://github.com/wandb/weave/blob/5d9590d2658eeb69c9c9f04342e107bf9a0a4c90/sdks/node/src/evaluationLogger.ts#L317)

## 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.

#### Returns

`Promise`\<`void`>

#### Defined in

[evaluationLogger.ts:410](https://github.com/wandb/weave/blob/5d9590d2658eeb69c9c9f04342e107bf9a0a4c90/sdks/node/src/evaluationLogger.ts#L410)

***

### logScore

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

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

#### Parameters

| Name         | Type     | Description                                        |
| :----------- | :------- | :------------------------------------------------- |
| `scorerName` | `string` | Name of the scorer (e.g., "accuracy", "f1\_score") |
| `score`      | `any`    | The score value                                    |

#### Returns

`Promise`\<`void`>

#### Defined in

[evaluationLogger.ts:332](https://github.com/wandb/weave/blob/5d9590d2658eeb69c9c9f04342e107bf9a0a4c90/sdks/node/src/evaluationLogger.ts#L332)
