메인 콘텐츠로 건너뛰기
weave / ScoreLogger ScoreLogger는 단일 예측의 점수 산정을 관리합니다. EvaluationLogger.logPrediction()에서 반환되는 객체입니다. Example
const  = await ev.logPrediction(example, output);
await .logScore("accuracy", 0.95);
await .logScore("relevance", 0.8);
await .finish(); // 예측을 완료합니다

목차

생성자

접근자

메서드

생성자

생성자

new ScoreLogger(evalLogger): ScoreLogger

매개변수

이름유형
evalLoggerEvaluationLogger

반환값

ScoreLogger

정의된 위치

src/evaluationLogger.ts:338

접근자

isFinishCalled

get isFinishCalled(): boolean finish()가 호출되었는지 확인합니다. 완료되지 않은 예측을 감지하기 위해 EvaluationLogger에서 사용됩니다.

반환값

boolean

정의된 위치

src/evaluationLogger.ts:368

메서드

finish

finish(): Promise<void> 예측의 점수 산정 과정을 완료합니다. 누적된 점수로 predict_and_score call을 완료합니다. incremental 집계를 업데이트하고 메모리를 해제합니다.

반환값

Promise<void>

정의된 위치

src/evaluationLogger.ts:470

logScore

logScore(scorerName, score): Promise<void> 이 예측의 점수를 기록합니다. predict_and_score의 자식으로 scorer call을 생성합니다.

매개변수

이름유형설명
scorerNamestringscorer 이름(예: “accuracy”, “f1_score”)
scoreany점수 값

반환값

Promise<void>

정의된 위치

src/evaluationLogger.ts:379