Browse Source

list exo processes before test, warmup req in bench

Alex Cheema 7 months ago
parent
commit
87865f0cd9
2 changed files with 14 additions and 1 deletions
  1. 10 1
      .github/bench.py
  2. 4 0
      .github/workflows/bench_job.yml

+ 10 - 1
.github/bench.py

@@ -97,9 +97,18 @@ async def main() -> None:
     api_endpoint = "http://localhost:52415/v1/chat/completions"
     api_endpoint = "http://localhost:52415/v1/chat/completions"
 
 
     # Define prompts
     # Define prompts
+    prompt_warmup = "what is the capital of France?"
     prompt_essay = "write an essay about cats"
     prompt_essay = "write an essay about cats"
 
 
-    # Measure performance for the essay prompt, which depends on the first measurement
+    # Warmup request
+    print("\nPerforming warmup request...", flush=True)
+    try:
+        warmup_results = await measure_performance(api_endpoint, prompt_warmup)
+        print("Warmup completed successfully", flush=True)
+    except Exception as e:
+        print(f"Warmup request failed: {e}", flush=True)
+
+    # Measure performance for the essay prompt
     print("\nMeasuring performance for the essay prompt...", flush=True)
     print("\nMeasuring performance for the essay prompt...", flush=True)
     results = await measure_performance(api_endpoint, prompt_essay)
     results = await measure_performance(api_endpoint, prompt_essay)
 
 

+ 4 - 0
.github/workflows/bench_job.yml

@@ -57,6 +57,10 @@ jobs:
           aws_access_key_id: ${{ secrets.S3_EXO_BENCHMARKS_AWS_ACCESS_KEY_ID }}
           aws_access_key_id: ${{ secrets.S3_EXO_BENCHMARKS_AWS_ACCESS_KEY_ID }}
           aws_secret_key: ${{ secrets.S3_EXO_BENCHMARKS_AWS_SECRET_ACCESS_KEY }}
           aws_secret_key: ${{ secrets.S3_EXO_BENCHMARKS_AWS_SECRET_ACCESS_KEY }}
         run: |
         run: |
+          # List existing exo processes
+          echo "Existing exo processes:"
+          ps aux | grep exo || true
+
           CALLING_JOB="${{ inputs.calling_job_name }}"
           CALLING_JOB="${{ inputs.calling_job_name }}"
           UNIQUE_JOB_ID="${CALLING_JOB}_${GITHUB_RUN_ID}"
           UNIQUE_JOB_ID="${CALLING_JOB}_${GITHUB_RUN_ID}"
           ALL_NODE_IDS=$(for i in $(seq ${{ strategy.job-total }} -1 0); do echo -n "${UNIQUE_JOB_ID}_${i},"; done | sed 's/,$//')
           ALL_NODE_IDS=$(for i in $(seq ${{ strategy.job-total }} -1 0); do echo -n "${UNIQUE_JOB_ID}_${i},"; done | sed 's/,$//')