Skip to content

feat(eval): Implement meta-evaluation #66

feat(eval): Implement meta-evaluation

feat(eval): Implement meta-evaluation #66

Workflow file for this run

name: Tests
on:
pull_request:
paths:
- .github/workflows/tests.yml
- safeguards/**
- pyproject.toml
- tests/**
jobs:
lint:
name: check linting using ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
# test-secrets-guardrail:
# name: test secrets guardrail
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - run: |
# pip install -U pip
# pip install torch --index-url https://download.pytorch.org/whl/cpu
# pip install -e ".[dev]"
# python -m pytest -s tests/test_secrets_detection.py
test-privilege-escalation:
name: test privilege escalation guardrail
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v4
- run: |
pip install -U pip
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -e ".[dev]"
python -m pytest -s tests/test_privilege_escalation.py
test-prompt-injection-llm:
name: test prompt injection llm guardrail
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v4
- run: |
pip install -U pip
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -e ".[dev]"
python -m pytest -s tests/test_prompt_injection_llm.py
test-prompt-injection-classifier:
name: test prompt injection classifier guardrail
runs-on: ubuntu-latest
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
steps:
- uses: actions/checkout@v4
- run: |
pip install -U pip
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -e ".[dev]"
huggingface-cli login --token ${{ secrets.HF_TOKEN }}
python -m pytest -s tests/test_prompt_injection_classifier.py
test-evaluation-classification:
name: test evaluation classification
runs-on: ubuntu-latest
env:
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
steps:
- uses: actions/checkout@v4
- run: |
pip install -U pip
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -e ".[dev]"
python -m pytest -s tests/test_evaluation_classification.py