mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-20 04:37: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
|
// Process in batches
|
||||||
for (let i = 0; i < results.length; i += this.batchSize) {
|
for (let i = 0; i < results.length; i += this.batchSize) {
|
||||||
const batch = results.slice(i, i + this.batchSize);
|
const batch = results.slice(i, i + this.batchSize);
|
||||||
console.log(
|
// Write progress to stderr to avoid contaminating JSON output on stdout
|
||||||
` Judging batch ${Math.floor(i / this.batchSize) + 1}/${Math.ceil(results.length / this.batchSize)}...`,
|
process.stderr.write(
|
||||||
|
` Judging batch ${Math.floor(i / this.batchSize) + 1}/${Math.ceil(results.length / this.batchSize)}...\n`,
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user