[object Object]

← back to Exo

flush

7b77ef000e939f1920261e5ee5a58b299b05c9f9 · 2024-12-06 22:45:06 +0000 · Glen

Files touched

Diff

commit 7b77ef000e939f1920261e5ee5a58b299b05c9f9
Author: Glen <glen@192.168.1.214>
Date:   Fri Dec 6 22:45:06 2024 +0000

    flush
---
 .github/bench.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/.github/bench.py b/.github/bench.py
index 7256ab52..09fdf622 100644
--- a/.github/bench.py
+++ b/.github/bench.py
@@ -88,13 +88,13 @@ async def main() -> None:
     prompt_essay = "write an essay about cats"
 
     # Measure performance for the basic prompt
-    print("Measuring performance for the basic prompt...")
+    print("Measuring performance for the basic prompt...", flush=True)
     results_basic = await measure_performance(api_endpoint, prompt_basic)
-    print("Basic prompt performance metrics:")
+    print("Basic prompt performance metrics:", flush=True)
     print(json.dumps(results_basic, indent=4))
 
     # Measure performance for the essay prompt, which depends on the first measurement
-    print("\nMeasuring performance for the essay prompt...")
+    print("\nMeasuring performance for the essay prompt...", flush=True)
     results = await measure_performance(api_endpoint, prompt_essay)
 
     # Save metrics from the "universe and everything" prompt
@@ -103,13 +103,13 @@ async def main() -> None:
     try:
         with open(metrics_file, "w", encoding="utf-8") as f:
             json.dump(results, f, indent=4)
-        print(f"Performance metrics saved to {metrics_file}")
+        print(f"Performance metrics saved to {metrics_file}", flush=True)
     except IOError as e:
-        print(f"Failed to save metrics: {e}")
+        print(f"Failed to save metrics: {e}", flush=True)
 
     # Optionally print the metrics for visibility
-    print("Performance metrics:")
-    print(json.dumps(results, indent=4))
+    print("Performance metrics:", flush=True)
+    print(json.dumps(results, indent=4), flush=True)
 
 
 if __name__ == "__main__":

← 6c08b323 nodebug  ·  back to Exo  ·  conf 6dae3a47 →