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

# Class: EvaluationLogger

> TypeScript SDK 레퍼런스

[weave](../) / EvaluationLogger

EvaluationLogger 는 prediction 과 점수의 점진적인 로그 기록을 가능하게 합니다.

사전에 데이터셋 정의와 배치 처리가 필요한 전통적인 Evaluation 클래스와 달리, EvaluationLogger 를 사용하면 prediction 이 발생하는 즉시 유연한 스코어링과 함께 로그를 남길 수 있습니다.

`Example`

```ts theme={null}
const ev = new EvaluationLogger({name: 'my-eval', dataset: 'my-dataset'});

for (const example of streamingData) {
  const output = await myModel.predict(example);
  const pred = ev.logPrediction(example, output);

  if (shouldScore(output)) {
    pred.logScore("accuracy", calculateAccuracy(output));
  }
  pred.finish();
}

await ev.logSummary();
```

## 목차

### Constructors

* [constructor](./evaluationlogger#constructor)

### Methods

* [logPrediction](./evaluationlogger#logprediction)
* [logPredictionAsync](./evaluationlogger#logpredictionasync)
* [logSummary](./evaluationlogger#logsummary)

## Constructors

### constructor

• **new EvaluationLogger**(`options`): [`EvaluationLogger`](./evaluationlogger)

#### 파라미터

| 이름        | 타입                        |
| :-------- | :------------------------ |
| `options` | `EvaluationLoggerOptions` |

#### Returns

[`EvaluationLogger`](./evaluationlogger)

#### 정의 위치

[evaluationLogger.ts:554](https://github.com/wandb/weave/blob/1aee4006a95d913addb45881dfc950de7ce7b0bd/sdks/node/src/evaluationLogger.ts#L554)

## Methods

### logPrediction

▸ **logPrediction**(`inputs`, `output`): [`ScoreLogger`](./scorelogger)

입력과 출력을 포함한 prediction 을 로그에 기록합니다 (동기 버전).
predict\_and\_score 호출을 생성합니다 (자식 predict 호출 포함).
점수 추가를 위해 ScoreLogger 를 즉시 반환합니다.

이 메소드는 ScoreLogger 를 동기적으로 반환합니다. ScoreLogger 에 대한 작업 (logScore, finish) 은 대기열에 추가되어 초기화가 완료된 후 실행됩니다.

#### 파라미터

| 이름       | 타입                         |
| :------- | :------------------------- |
| `inputs` | `Record`\<`string`, `any`> |
| `output` | `any`                      |

#### Returns

[`ScoreLogger`](./scorelogger)

`Example`

```ts theme={null}
// 실행 후 대기하지 않는 방식 (Fire-and-forget style)
const scoreLogger = evalLogger.logPrediction({input: 'test'}, 'output');
scoreLogger.logScore('accuracy', 0.95);
scoreLogger.finish();
await evalLogger.logSummary(); // 모든 작업이 완료될 때까지 대기
```

#### 정의 위치

[evaluationLogger.ts:641](https://github.com/wandb/weave/blob/1aee4006a95d913addb45881dfc950de7ce7b0bd/sdks/node/src/evaluationLogger.ts#L641)

***

### logPredictionAsync

▸ **logPredictionAsync**(`inputs`, `output`): `Promise`\<[`ScoreLogger`](./scorelogger)>

입력과 출력을 포함한 prediction 을 로그에 기록합니다 (비동기 버전).
logPrediction() 과 유사하지만, prediction 호출이 완전히 초기화되었을 때 resolve 되는 Promise 를 반환합니다.

다음 단계로 진행하기 전에 초기화 완료를 기다려야 하는 경우에 사용하세요.

#### 파라미터

| 이름       | 타입                         |
| :------- | :------------------------- |
| `inputs` | `Record`\<`string`, `any`> |
| `output` | `any`                      |

#### Returns

`Promise`\<[`ScoreLogger`](./scorelogger)>

`Example`

```ts theme={null}
// 대기 가능한 방식 (Awaitable style)
const scoreLogger = await evalLogger.logPredictionAsync({input: 'test'}, 'output');
await scoreLogger.logScore('accuracy', 0.95);
await scoreLogger.finish();
```

#### 정의 위치

[evaluationLogger.ts:666](https://github.com/wandb/weave/blob/1aee4006a95d913addb45881dfc950de7ce7b0bd/sdks/node/src/evaluationLogger.ts#L666)

***

### logSummary

▸ **logSummary**(`summary?`): `Promise`\<`void`>

요약을 로그에 기록하고 평가를 종료합니다.
summarize 호출을 생성하고 evaluate 호출을 마무리합니다.

이 메소드는 await 없이 호출할 수 있지만 (fire-and-forget), 내부적으로는 모든 보류 중인 작업이 완료될 때까지 기다립니다.

#### 파라미터

| 이름         | 타입                         |
| :--------- | :------------------------- |
| `summary?` | `Record`\<`string`, `any`> |

#### Returns

`Promise`\<`void`>

#### 정의 위치

[evaluationLogger.ts:767](https://github.com/wandb/weave/blob/1aee4006a95d913addb45881dfc950de7ce7b0bd/sdks/node/src/evaluationLogger.ts#L767)
