Skip to content

Commit d1aff0e

Browse files
committed
benchmark only save under 1mb
1 parent e69a505 commit d1aff0e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

koboldcpp.py

+3
Original file line numberDiff line numberDiff line change
@@ -2535,6 +2535,9 @@ def onready_subprocess():
25352535
benchmaxctx = (2048 if maxctx>2048 else maxctx)
25362536
benchlen = 100
25372537
benchmodel = sanitize_string(os.path.splitext(os.path.basename(modelname))[0])
2538+
if os.path.exists(args.benchmark) and os.path.getsize(args.benchmark) > 1000000:
2539+
print(f"\nWarning: The benchmark CSV output file you selected exceeds 1MB. This is probably not what you want, did you select the wrong CSV file?\nFor safety, benchmark output will not be saved.")
2540+
save_to_file = False
25382541
if save_to_file:
25392542
print(f"\nRunning benchmark (Save to File: {args.benchmark})...")
25402543
else:

0 commit comments

Comments
 (0)