claude-evolve 1.3.13 → 1.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/claude-evolve-analyze +14 -10
- package/package.json +1 -1
|
@@ -314,8 +314,8 @@ if command -v gnuplot >/dev/null 2>&1 && [[ $valid_performance_count -gt 0 ]]; t
|
|
|
314
314
|
max_row=0
|
|
315
315
|
max_id=""
|
|
316
316
|
|
|
317
|
-
# Use Python to generate chart data
|
|
318
|
-
"$PYTHON_CMD" -c "
|
|
317
|
+
# Use Python to generate chart data and capture output
|
|
318
|
+
python_output=$("$PYTHON_CMD" -c "
|
|
319
319
|
import csv
|
|
320
320
|
import re
|
|
321
321
|
|
|
@@ -355,7 +355,7 @@ with open('$csv_file', 'r') as f:
|
|
|
355
355
|
if match:
|
|
356
356
|
gen_num = int(match.group(1))
|
|
357
357
|
|
|
358
|
-
data_lines.append(f'{row_num}
|
|
358
|
+
data_lines.append(f'{row_num} \\\"{id}\\\" {perf} {gen_num}')
|
|
359
359
|
gen_temp_lines.append(f'{gen} {perf}')
|
|
360
360
|
|
|
361
361
|
# Track the winner
|
|
@@ -369,20 +369,21 @@ with open('$csv_file', 'r') as f:
|
|
|
369
369
|
# Write data file
|
|
370
370
|
with open('$data_file', 'a') as f:
|
|
371
371
|
for line in data_lines:
|
|
372
|
-
f.write(line + '
|
|
372
|
+
f.write(line + '\\\\n')
|
|
373
373
|
|
|
374
374
|
# Write gen temp file
|
|
375
375
|
with open('$gen_data_temp', 'a') as f:
|
|
376
376
|
for line in gen_temp_lines:
|
|
377
|
-
f.write(line + '
|
|
377
|
+
f.write(line + '\\\\n')
|
|
378
378
|
|
|
379
379
|
# Output max values for shell
|
|
380
380
|
print(f'max_perf={max_perf}')
|
|
381
381
|
print(f'max_row={max_row}')
|
|
382
|
-
print(f'max_id
|
|
383
|
-
"
|
|
384
|
-
|
|
385
|
-
|
|
382
|
+
print(f'max_id=\\\"{max_id}\\\"')
|
|
383
|
+
")
|
|
384
|
+
|
|
385
|
+
# Evaluate the Python output
|
|
386
|
+
eval "$python_output"
|
|
386
387
|
|
|
387
388
|
# Create generation averages file and track max generation
|
|
388
389
|
gen_index=1
|
|
@@ -407,8 +408,11 @@ print(f'max_id=\"{max_id}\"')
|
|
|
407
408
|
done
|
|
408
409
|
|
|
409
410
|
# Create winner data point
|
|
410
|
-
if [[ -n $max_id ]]; then
|
|
411
|
+
if [[ -n $max_id && -n $max_row && -n $max_perf ]]; then
|
|
411
412
|
echo "$max_row \"$max_id\" $max_perf" >"$winner_file"
|
|
413
|
+
else
|
|
414
|
+
# Create empty winner file to avoid gnuplot warning
|
|
415
|
+
echo "0 \"\" 0" >"$winner_file"
|
|
412
416
|
fi
|
|
413
417
|
|
|
414
418
|
# Generate dual plot
|