|
| 1 | +name: Nightly - Router Perf Test (Optimized Baseline 10k-1k) |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 9 * * *' # Run daily at 09:00 UTC |
| 6 | + workflow_dispatch: # Enable manual triggering from UI |
| 7 | + inputs: |
| 8 | + gcp_project_id: |
| 9 | + description: 'GCP Project ID' |
| 10 | + default: 'llm-d-scale' |
| 11 | + required: true |
| 12 | + type: string |
| 13 | + gke_cluster_name: |
| 14 | + description: 'GKE Cluster Name' |
| 15 | + default: 'llm-d-ap-usc1-router-perf' |
| 16 | + required: true |
| 17 | + type: string |
| 18 | + gke_cluster_zone: |
| 19 | + description: 'GKE Cluster Zone/Region' |
| 20 | + default: 'us-central1' |
| 21 | + required: true |
| 22 | + type: string |
| 23 | + sim_replicas: |
| 24 | + description: 'Number of simulator replicas' |
| 25 | + default: '10' |
| 26 | + required: true |
| 27 | + type: string |
| 28 | + router_config: |
| 29 | + description: 'Path to consolidated router Helm values configuration' |
| 30 | + default: 'test/perf/config/router-configs/optimized-baseline.yaml' |
| 31 | + required: true |
| 32 | + type: string |
| 33 | + test_name: |
| 34 | + description: 'Test identifier name' |
| 35 | + default: 'optimized-baseline-job1' |
| 36 | + required: true |
| 37 | + type: string |
| 38 | + perf_job: |
| 39 | + description: 'Performance job configuration path' |
| 40 | + default: 'test/perf/config/shared_prefix_job1.yaml' |
| 41 | + required: true |
| 42 | + type: string |
| 43 | + |
| 44 | +permissions: |
| 45 | + contents: write |
| 46 | + actions: read |
| 47 | + |
| 48 | +jobs: |
| 49 | + run-perf-benchmark: |
| 50 | + runs-on: ubuntu-latest |
| 51 | + env: |
| 52 | + # This cluster must have the Gateway API Inference Extension CRDs |
| 53 | + # already installed in it. |
| 54 | + GCP_PROJECT_ID: ${{ inputs.gcp_project_id || 'llm-d-scale' }} |
| 55 | + GKE_CLUSTER_NAME: ${{ inputs.gke_cluster_name || 'llm-d-ap-usc1-router-perf' }} |
| 56 | + GKE_CLUSTER_ZONE: ${{ inputs.gke_cluster_zone || 'us-central1' }} |
| 57 | + SIM_REPLICAS: ${{ inputs.sim_replicas || '10' }} |
| 58 | + ROUTER_CONFIG: ${{ inputs.router_config || 'test/perf/config/router-configs/optimized-baseline.yaml' }} |
| 59 | + TEST_NAME: ${{ inputs.test_name || 'optimized-baseline-job1' }} |
| 60 | + PERF_JOB: ${{ inputs.perf_job || 'test/perf/config/shared_prefix_job1.yaml' }} |
| 61 | + HF_TOKEN: ${{ secrets.HF_TOKEN }} |
| 62 | + steps: |
| 63 | + - name: Checkout llm-d/llm-d-router |
| 64 | + uses: actions/checkout@v6 |
| 65 | + |
| 66 | + - name: Checkout kubernetes-sigs/inference-perf |
| 67 | + uses: actions/checkout@v6 |
| 68 | + with: |
| 69 | + repository: kubernetes-sigs/inference-perf |
| 70 | + path: inference-perf |
| 71 | + |
| 72 | + - name: Authenticate to Google Cloud |
| 73 | + uses: google-github-actions/auth@v2 |
| 74 | + with: |
| 75 | + credentials_json: ${{ secrets.GKE_SA_KEY }} |
| 76 | + |
| 77 | + - name: Set up gcloud CLI and kubectl |
| 78 | + uses: google-github-actions/setup-gcloud@v2 |
| 79 | + with: |
| 80 | + project_id: ${{ env.GCP_PROJECT_ID }} |
| 81 | + install_components: 'kubectl,gke-gcloud-auth-plugin' |
| 82 | + |
| 83 | + - name: Get GKE credentials |
| 84 | + run: | |
| 85 | + gcloud container clusters get-credentials "${{ env.GKE_CLUSTER_NAME }}" \ |
| 86 | + --zone "${{ env.GKE_CLUSTER_ZONE }}" \ |
| 87 | + --project "${{ env.GCP_PROJECT_ID }}" |
| 88 | +
|
| 89 | + - name: Install helm |
| 90 | + run: | |
| 91 | + curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash |
| 92 | +
|
| 93 | + - name: Set up Python |
| 94 | + uses: actions/setup-python@v5 |
| 95 | + with: |
| 96 | + python-version: "3.10" |
| 97 | + |
| 98 | + - name: Install Python dependencies |
| 99 | + run: | |
| 100 | + python3 -m pip install --upgrade pip |
| 101 | + python3 -m pip install pyyaml |
| 102 | +
|
| 103 | + - name: Run Performance Test Script |
| 104 | + run: | |
| 105 | + python3 test/perf/run_nightly_perf.py \ |
| 106 | + --router-config ${{ env.ROUTER_CONFIG }} \ |
| 107 | + --test-name ${{ env.TEST_NAME }} \ |
| 108 | + --perf-chart ${{ github.workspace }}/inference-perf/deploy/inference-perf \ |
| 109 | + --perf-job ${{ env.PERF_JOB }} \ |
| 110 | + --sim-replicas ${{ env.SIM_REPLICAS }} \ |
| 111 | + --results-dir test/perf/results/optimized-baseline \ |
| 112 | + --router-machine-family e2 \ |
| 113 | + --gcp-project ${{ env.GCP_PROJECT_ID }} |
| 114 | +
|
| 115 | + - name: Upload Performance Results |
| 116 | + uses: actions/upload-artifact@v4 |
| 117 | + if: always() |
| 118 | + with: |
| 119 | + name: epp-perf-results |
| 120 | + path: test/perf/results/optimized-baseline/ |
| 121 | + |
| 122 | + - name: Commit and push updated results |
| 123 | + if: success() && github.ref == 'refs/heads/main' |
| 124 | + run: | |
| 125 | + git config --global user.name "github-actions[bot]" |
| 126 | + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 127 | + git add test/perf/results/optimized-baseline/ |
| 128 | + git commit -m "Auto-update EPP nightly performance results [skip ci]" || exit 0 |
| 129 | + git pull --rebase origin main |
| 130 | + git push |
0 commit comments