Performance Tests #33
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Performance Tests | |
| on: # yamllint disable-line rule:truthy | |
| schedule: | |
| - cron: "30 6 * * 1" # every Monday at 6:30 AM UTC | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| integration-tests-slurm: | |
| name: Performance testing on a SLURM cluster | |
| runs-on: self-hosted | |
| timeout-minutes: 30 | |
| if: github.actor == 'jacob-chmura' || github.actor == 'shenyanghuang' || github.actor == 'benjaminnNgo' | |
| env: | |
| REAL_HOME: /home/mila/j/jacob.chmura | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set Runtime Environment Variables | |
| run: | | |
| echo "TGB_DATA_ROOT=$REAL_HOME/tgb_datasets" >> $GITHUB_ENV | |
| echo "TGM_CI_PERF_LOG_BASE=$REAL_HOME/tgm_ci_perf" >> $GITHUB_ENV | |
| - name: Set up python | |
| id: setup-python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Set up uv | |
| run: curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh | |
| - name: Restore uv cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.uv-cache | |
| key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
| restore-keys: | | |
| uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
| uv-${{ runner.os }} | |
| - name: Download TGB datasets | |
| id: submit-download | |
| run: | | |
| echo "Preparing TGB datasets in $TGB_DATA_ROOT..." | |
| JOB_ID=$(sbatch --parsable .github/scripts/run_download_tgb_job_sbatch.sh "$TGB_DATA_ROOT") | |
| echo "job_id=$JOB_ID" >> $GITHUB_OUTPUT | |
| - name: Wait for Download TGB job to finish | |
| run: | | |
| JOB_ID="${{ steps.submit-download.outputs.job_id }}" | |
| .github/scripts/poll_slurm_job.sh "$JOB_ID" --timeout 3600 --interval 10 | |
| - name: Install dependencies | |
| run: uv sync --group dev | |
| - name: Submit Performance Benchmark Job | |
| id: submit-bench | |
| run: | | |
| JOB_ID=$(sbatch --parsable .github/scripts/run_perf_job_sbatch.sh) | |
| echo "job_id=$JOB_ID" >> $GITHUB_OUTPUT | |
| - name: Wait for SLURM job to finish | |
| run: | | |
| JOB_ID="${{ steps.submit-bench.outputs.job_id }}" | |
| .github/scripts/poll_slurm_job.sh "$JOB_ID" --timeout 3600 --interval 10 | |
| - name: Get Latest CI Run Log Path | |
| if: always() | |
| id: get-log-dir | |
| run: | | |
| # Parse path + ID written by the test runner (2 lines in ~/tgm_ci_perf/latest_path.txt) | |
| mapfile -t lines < "$TGM_CI_PERF_LOG_BASE/latest_path.txt" | |
| LOG_PATH="${lines[0]}" | |
| CI_RUN_DIR="${lines[1]}" | |
| echo "log_path=$LOG_PATH" >> "$GITHUB_OUTPUT" | |
| echo "ci_run_dir=$CI_RUN_DIR" >> "$GITHUB_OUTPUT" | |
| echo "Resolved log path: $LOG_PATH" | |
| echo "Resolved run dir: $CI_RUN_DIR" | |
| - name: Upload benchmark results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ steps.get-log-dir.outputs.ci_run_dir }}-benchmarks | |
| path: $TGM_CI_PERF_LOG_BASE/benchmarks.json | |
| - name: Minimize uv cache | |
| run: uv cache prune --ci |