MCPcopy Create free account
hub / github.com/METR/vivaria / convertIntermediateScoreToNumber

Function convertIntermediateScoreToNumber

shared/src/util.ts:386–397  ·  view source on GitHub ↗
(score: number | 'NaN' | 'Infinity' | '-Infinity')

Source from the content-addressed store, hash-verified

384}
385
386export function convertIntermediateScoreToNumber(score: number | 'NaN' | 'Infinity' | '-Infinity'): number {
387 switch (score) {
388 case 'NaN':
389 return NaN
390 case 'Infinity':
391 return Infinity
392 case '-Infinity':
393 return -Infinity
394 default:
395 return score
396 }
397}

Callers 2

getScoreLogMethod · 0.90
ScoreEntryFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected