.
This commit is contained in:
@@ -24,17 +24,18 @@ async function predictAll() {
|
||||
|
||||
const finalResults: any[] = [];
|
||||
|
||||
let i = 0;
|
||||
for (const file of files) {
|
||||
const fullPath = join(tjaDir, file);
|
||||
|
||||
|
||||
for (const diff of targetDifficulties) {
|
||||
try {
|
||||
// 개별 예측 실행
|
||||
const cmd = `bun script/predict.ts "${workingDir}" "${fullPath}" "${diff}"`;
|
||||
const output = execSync(cmd, { stdio: ['pipe', 'pipe', 'ignore'] }).toString();
|
||||
|
||||
|
||||
const match = output.match(/(?:Prediction|Predicted Difficulty):\s*(\d+\.\d+)/);
|
||||
|
||||
|
||||
if (match) {
|
||||
const value = parseFloat(match[1]);
|
||||
console.log(`✅ [${file}] ${diff.toUpperCase()}: ${value}`);
|
||||
@@ -48,6 +49,8 @@ async function predictAll() {
|
||||
// 해당 난이도가 없는 경우 조용히 넘어감
|
||||
}
|
||||
}
|
||||
i++;
|
||||
console.log(`${i}/${files.length}`)
|
||||
}
|
||||
|
||||
// 결과 저장 (확장자에 따라 분기)
|
||||
|
||||
Reference in New Issue
Block a user