Skip to content

Commit

Permalink
Add tests for helm
Browse files Browse the repository at this point in the history
Signed-off-by: Elron Bandel <elron.bandel@ibm.com>
  • Loading branch information
elronbandel committed Apr 9, 2024
1 parent 2b6b912 commit 8a9bea9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test_helm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test HELM Integration

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
compile-docs:

runs-on: ubuntu-latest
env:
OS: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip' # caching pip dependencies
- run: pip install git+https://github.com/stanford-crfm/helm.git

- name: Test Helm
run: utils/run_helm.sh

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,5 @@ ibmcos_datasets/
kaggle.json

src/unitxt/catalog_back/*
prod_env/*
benchmark_output/*
12 changes: 12 additions & 0 deletions utils/run_helm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
recipe="card=cards.wnli,template=templates.classification.multi_class.relation.default"
hf_model="microsoft/phi-1_5"

helm-run \
--run-entries "unitxt:$recipe,model=$hf_model" \
--enable-huggingface-models $hf_model \
--max-eval-instances 10 --suite v1

if [ ! -f "benchmark_output/runs/v1/unitxt:card=cards.wnli,template=templates.classification.multi_class.relation.default,model=microsoft_phi-1_5/scenario_state.json" ]; then
echo "Error: File does not exist." >&2
exit 1
fi

0 comments on commit 8a9bea9

Please sign in to comment.