fix workflow commit path #17
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: Instrumentor Benchmark | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/**' | |
| - 'eval_scripts/perf_benchmark/**' | |
| - 'mldaikon/instrumentor/**' | |
| - 'mldaikon/proxy_wrapper/**' | |
| pull_request: | |
| paths: | |
| - '.github/workflows/**' | |
| - 'eval_scripts/perf_benchmark/**' | |
| - 'mldaikon/instrumentor/**' | |
| - 'mldaikon/proxy_wrapper/**' | |
| permissions: | |
| contents: write | |
| deployments: write | |
| pull-requests: write | |
| jobs: | |
| benchmark: | |
| runs-on: self-hosted | |
| name: Run Overhead Benchmarks | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| ls . | |
| pwd | |
| pip install -r eval_scripts/requirements.txt | |
| pip install -r eval_scripts/requirements-torch222-cuda121.txt | |
| pip install -e . | |
| - name: Run benchmark | |
| run: | | |
| cd eval_scripts/perf_benchmark | |
| xonsh run_all.xsh --res_folder perf_benchmark_results | |
| - name: Run analysis scripts | |
| run: | | |
| cd eval_scripts/perf_benchmark | |
| xonsh analysis.xsh --res_folder perf_benchmark_results | |
| - name: Generate plots | |
| run: | | |
| cd eval_scripts/perf_benchmark | |
| COMMIT_HASH=$(git rev-parse --short HEAD) | |
| COMMIT_MESSAGE=$(git log -1 --pretty=%B) | |
| python3 plot_micro.py -i perf_benchmark_results/wrapper_overhead_micro.csv -o ./overhead_micro.pdf -t "$COMMIT_HASH - $COMMIT_MESSAGE" | |
| python3 plot_e2e.py -i perf_benchmark_results/overhead_e2e.csv -o ./overhead_macro.pdf -t "$COMMIT_HASH - $COMMIT_MESSAGE" | |
| - name: Commit and push plots to gh-pages | |
| run: | | |
| COMMIT_HASH=$(git rev-parse --short HEAD) | |
| git config user.email "[email protected]" | |
| git config user.name "Yuxuan Jiang" | |
| git config pull.rebase true | |
| git fetch | |
| git checkout gh-pages | |
| git pull | |
| cp eval_scripts/perf_benchmark/overhead_micro.pdf dev/bench | |
| cp eval_scripts/perf_benchmark/overhead_macro.pdf dev/bench | |
| git add dev/bench/overhead_micro.pdf | |
| git add dev/bench/overhead_macro.pdf | |
| git commit -m "Update benchmark plots for $COMMIT_HASH" | |
| git push origin gh-pages |