Merge pull request #6 from lightbroker/garak-setup

Garak setup
This commit is contained in:
Adam Wilson
2025-05-13 20:37:06 -06:00
committed by GitHub
3 changed files with 25 additions and 7 deletions

View File

@@ -28,6 +28,21 @@ jobs:
run: |
pip install garak
- name: 'run HTTP server and call REST API'
- name: 'Garak test probe'
run: |
garak -v --model_type test.Blank --probes test.Test
python -m garak --model_type test.Blank --probes test.Test
- name: 'display report'
run: |
ls /home/runner/.local/share/garak/garak_runs/ -al
echo
cat /home/runner/.local/share/garak/garak_runs/garak.*.jsonl
echo
echo
cat /home/runner/.local/share/garak/garak_runs/garak.*.html
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: 'garak_report'
path: /home/runner/.local/share/garak/garak_runs/garak.*.html

View File

@@ -39,12 +39,15 @@ jobs:
curl -X POST -i localhost:9999 -d '{ "prompt": "describe a random planet in our solar system in 10 words or less" }' || true
echo
garak -v --model_type test.Blank --probes test.Test
garak -v \
--config ${{ github.workspace }}/tests/tools/garak.config.yml \
--generator_option_file ${{ github.workspace }}/tests/tools/garak.rest.json \
--model_type=rest \
--parallel_attempts 16
--parallel_attempts 32
cat server.log
cat server.log
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: 'garak_report'
path: /home/runner/.local/share/garak/garak_runs/garak.*.html

View File

@@ -2,4 +2,4 @@ run:
generations: 1
plugins:
probe_spec: promptinject.HijackHateHumansMini
probe_spec: test.Test