maybe this yml #13
Workflow file for this run
This file contains 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: Test Performance | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
jobs: | ||
run-performance: | ||
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: | ||
- name: Set up | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
- name: Install requirements | ||
run: | | ||
pip install -r requirements/dev.rqr | ||
- 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 |