CodeBench: kierroskohtainen output-dir + tiivistetty Go golden example

- runPipeline saa round-parametrin, dir: model__scenario__r1, __r2 jne.
- todo-go.md testit 6→4 (poistettu list+update toisteiset), 466→370 riviä
This commit is contained in:
2026-04-14 20:57:50 +03:00
parent 01364b7031
commit 8fc31f2a53
2 changed files with 16 additions and 108 deletions

View File

@@ -308,7 +308,7 @@ function starsForScore(score) {
}
// === Pipeline: yhdelle mallille ja skenaariolle ===
async function runPipeline(model, scenario) {
async function runPipeline(model, scenario, round = 1) {
const result = {
model, scenario: scenario.id,
reqOk: false, specOk: false, specEntities: 0,
@@ -321,7 +321,8 @@ async function runPipeline(model, scenario) {
};
const timings = [];
const { system: CODE_SYSTEM, promptName, profile } = getCodePromptForModel(model);
const dir = `${OUTPUT_DIR}/${model.replace(/[/:]/g, '_')}__${scenario.id}`;
const roundSuffix = ROUNDS > 1 ? `__r${round}` : '';
const dir = `${OUTPUT_DIR}/${model.replace(/[/:]/g, '_')}__${scenario.id}${roundSuffix}`;
mkdirSync(dir, { recursive: true });
try {
@@ -651,7 +652,7 @@ async function main() {
for (const scenario of scenarios) {
const roundLabel = ROUNDS > 1 ? ` [${round}/${ROUNDS}]` : '';
console.log(`\n━━━ ${model} × ${scenario.id}${roundLabel} ━━━`);
const r = await runPipeline(model, scenario);
const r = await runPipeline(model, scenario, round);
if (ROUNDS > 1) r.round = round;
results.push(r);