mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-20 12:47:00 +00:00
Fix JSON output contamination in test runner
Change judge.ts progress message from console.log (stdout) to process.stderr.write (stderr) to prevent 'Judging batch...' message from contaminating JSON output when using --output json flag.
This commit is contained in:
@@ -98,8 +98,9 @@ Respond ONLY with the JSON array, no other text.`;
|
||||
// Process in batches
|
||||
for (let i = 0; i < results.length; i += this.batchSize) {
|
||||
const batch = results.slice(i, i + this.batchSize);
|
||||
console.log(
|
||||
` Judging batch ${Math.floor(i / this.batchSize) + 1}/${Math.ceil(results.length / this.batchSize)}...`,
|
||||
// Write progress to stderr to avoid contaminating JSON output on stdout
|
||||
process.stderr.write(
|
||||
` Judging batch ${Math.floor(i / this.batchSize) + 1}/${Math.ceil(results.length / this.batchSize)}...\n`,
|
||||
);
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user