Skip to content

performance profiler with visualization #17

performance profiler with visualization

performance profiler with visualization #17

Workflow file for this run

name: Test Performance
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
run-performance-tests:
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
UNITXT_DEFAULT_VERBOSITY: error
DATASETS_VERBOSITY: error
HF_HUB_VERBOSITY: error
HF_DATASETS_DISABLE_PROGRESS_BARS: "True"
TQDM_DISABLE: "True"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system -e ".[tests]"
- run: pip install coverage[toml]
- name: Create profile/logs dir
run: mkdir -p profile/logs
- name: Save card_profiler python script
uses: actions/upload-artifact@v3
with:
name: card_profiler
path: profile/card_profiler.py
- name: Run performance on PR branch
run: |
python profile/card_profiler.py
cp profile/logs/cards_benchmark.json profile/logs/main_cards_benchmark.json
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
- name: Download card_profiler python script
uses: actions/download-artifact@v3
with:
name: card_profiler
path: profile/card_profiler.py
- name: Save main performance result
uses: actions/upload-artifact@v3
with:
name: main_score
path: profile/logs/main_cards_benchmark.json
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Run performance on PR branch
run: |
python profile/card_profiler.py
cp profile/logs/cards_benchmark.json profile/logs/pr_cards_benchmark.json
- name: Download main performance result
uses: actions/download-artifact@v3
with:
name: main_score
path: profile/logs/main_cards_benchmark.json
- name: Compare main and PR performance
run: python profile/compare_performance_results.py