| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| import { execSync } from 'node:child_process'; |
| import fs from 'node:fs'; |
|
|
| |
| |
| |
| async function main() { |
| const modelList = process.env.MODEL_LIST || 'gemini-3-flash-preview'; |
| const models = modelList.split(',').map((m) => m.trim()); |
|
|
| let combinedReport = ''; |
| let hasRegression = false; |
|
|
| console.log( |
| `๐ Starting evaluation orchestration for models: ${models.join(', ')}`, |
| ); |
|
|
| for (const model of models) { |
| console.log(`\n--- Processing Model: ${model} ---`); |
|
|
| try { |
| |
| console.log(`๐ Identifying trustworthy tests for ${model}...`); |
| const output = execSync( |
| `node scripts/get_trustworthy_evals.js "${model}"`, |
| { |
| encoding: 'utf-8', |
| stdio: ['inherit', 'pipe', 'inherit'], |
| }, |
| ).trim(); |
|
|
| if (!output) { |
| console.log(`โน๏ธ No trustworthy tests found for ${model}. Skipping.`); |
| continue; |
| } |
|
|
| |
| console.log(`๐งช Running regression check for ${model}...`); |
| execSync(`node scripts/run_regression_check.js "${model}" "${output}"`, { |
| stdio: 'inherit', |
| }); |
|
|
| |
| console.log(`๐ Generating report for ${model}...`); |
| const report = execSync(`node scripts/compare_evals.js "${model}"`, { |
| encoding: 'utf-8', |
| stdio: ['inherit', 'pipe', 'inherit'], |
| }).trim(); |
|
|
| if (report) { |
| if (combinedReport) { |
| combinedReport += '\n\n---\n\n'; |
| } |
| combinedReport += report; |
|
|
| |
| |
| if (report.includes('Action Required')) { |
| hasRegression = true; |
| } |
| } |
| } catch (error) { |
| console.error(`โ Error processing model ${model}:`, error.message); |
| |
| hasRegression = true; |
| } |
| } |
|
|
| |
| if (combinedReport) { |
| fs.writeFileSync('eval_regression_report.md', combinedReport); |
| console.log( |
| '\n๐ Final Markdown report saved to eval_regression_report.md', |
| ); |
| } |
|
|
| |
| if (hasRegression) { |
| console.error( |
| '\nโ ๏ธ Confirmed regressions detected across one or more models. See PR comment for details.', |
| ); |
| } else { |
| console.log('\nโ
All evaluations passed successfully (or were cleared).'); |
| } |
|
|
| process.exit(0); |
| } |
|
|
| main().catch((err) => { |
| console.error(err); |
| process.exit(1); |
| }); |
|
|