Skip to content

Commit

Permalink
update and add CI/CD for benchmark the model
Browse files Browse the repository at this point in the history
  • Loading branch information
bachvudinh committed Aug 1, 2024
1 parent 20985ec commit 3a0730c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/test-models.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test - Models
name: Test and Benchmark Models
on:
workflow_dispatch:
inputs:
Expand All @@ -17,9 +17,14 @@ on:
required: false
default: "--mode audio --num_rows 5"
type: string
run_benchmark:
description: 'Run benchmark test'
required: false
default: false
type: boolean

jobs:
run-test:
run-test-and-benchmark:
runs-on: research
steps:
- name: Checkout
Expand All @@ -34,4 +39,24 @@ jobs:
- name: Run tests
working-directory: ./tests
run: |
python3 test_case.py --model_dir ${{ github.event.inputs.model_id }} --data_dir ${{ github.event.inputs.dataset_id }} ${{ github.event.inputs.extra_args }}
python3 test_case.py --model_dir ${{ github.event.inputs.model_id }} --data_dir ${{ github.event.inputs.dataset_id }} ${{ github.event.inputs.extra_args }}
- name: Install benchmark dependencies
if: ${{ github.event.inputs.run_benchmark == 'true' }}
working-directory: ./lm-evaluation-harness
run: |
pip3 install -e .
- name: Run benchmark
if: ${{ github.event.inputs.run_benchmark == 'true' }}
working-directory: ./lm-evaluation-harness
run: |
chmod +x ./run_benchmark.sh
./run_benchmark.sh ${{ github.event.inputs.model_id }}
- name: Upload benchmark results
if: ${{ github.event.inputs.run_benchmark == 'true' }}
uses: actions/upload-artifact@v2
with:
name: benchmark-results
path: ./lm-evaluation-harness/benchmark_results/*.json
2 changes: 1 addition & 1 deletion lm-evaluation-harness

0 comments on commit 3a0730c

Please sign in to comment.