mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-05-30 19:59:32 +02:00
test 4 - GitHub Actions
This commit is contained in:
+6
-15
@@ -1,11 +1,9 @@
|
||||
name: 'Test RAG and CoT for all models'
|
||||
name: 'Test #4 | RAG + CoT | apple/OpenELM-3B-Instruct'
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -19,19 +17,12 @@ jobs:
|
||||
|
||||
- name: 'set up Python dependencies'
|
||||
shell: bash
|
||||
run: |
|
||||
pip install -r ${{ github.workspace }}/requirements.txt
|
||||
run: pip install -r ${{ github.workspace }}/requirements.txt
|
||||
|
||||
# - name: 'set up Microsoft Phi-3 Mini 4k LLM from HuggingFace'
|
||||
# shell: bash
|
||||
# run: |
|
||||
# pip install huggingface-hub[cli]
|
||||
# huggingface-cli download microsoft/Phi-3-mini-4k-instruct-onnx --include cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/* --local-dir ${{ github.workspace }}/infrastructure/foundation_model
|
||||
|
||||
- name: 'test RAG and CoT for all models'
|
||||
shell: bash
|
||||
run: |
|
||||
pytest -k test_04_malicious_prompts_rag_and_cot -s --disable-warnings
|
||||
- name: 'run text generation tests'
|
||||
shell: bash
|
||||
working-directory: tests/integration
|
||||
run: pytest test_04_malicious_prompts_rag_and_cot_apple_openelm_3b_instruct.py -s --disable-warnings
|
||||
|
||||
- name: Check for changes
|
||||
id: verify-changed-files
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
name: 'Test #4 | RAG + CoT | meta-llama/Llama-3.2-3B-Instruct'
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'checkout'
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
|
||||
- name: 'set up Python'
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: 'set up Python dependencies'
|
||||
shell: bash
|
||||
run: pip install -r ${{ github.workspace }}/requirements.txt
|
||||
|
||||
- name: 'run text generation tests'
|
||||
shell: bash
|
||||
working-directory: tests/integration
|
||||
run: pytest test_04_malicious_prompts_rag_and_cot_meta_llama_3_2_3b_instruct.py -s --disable-warnings
|
||||
|
||||
- name: Check for changes
|
||||
id: verify-changed-files
|
||||
run: |
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "changed=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Commit and push changes
|
||||
if: steps.verify-changed-files.outputs.changed == 'true'
|
||||
run: |
|
||||
git config --local user.email "42450907+lightbroker@users.noreply.github.com"
|
||||
git config --local user.name "Adam Wilson"
|
||||
git add .
|
||||
git commit -m "Auto-generated files from workflow [skip ci]"
|
||||
git push
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
name: 'Test #4 | RAG + CoT | microsoft/Phi-3-mini-4k-instruct'
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'checkout'
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
|
||||
- name: 'set up Python'
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: 'set up Python dependencies'
|
||||
shell: bash
|
||||
run: pip install -r ${{ github.workspace }}/requirements.txt
|
||||
|
||||
- name: 'run text generation tests'
|
||||
shell: bash
|
||||
working-directory: tests/integration
|
||||
run: pytest test_04_malicious_prompts_rag_and_cot_microsoft_phi_3_mini4k_instruct.py -s --disable-warnings
|
||||
|
||||
- name: Check for changes
|
||||
id: verify-changed-files
|
||||
run: |
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "changed=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Commit and push changes
|
||||
if: steps.verify-changed-files.outputs.changed == 'true'
|
||||
run: |
|
||||
git config --local user.email "42450907+lightbroker@users.noreply.github.com"
|
||||
git config --local user.name "Adam Wilson"
|
||||
git add .
|
||||
git commit -m "Auto-generated files from workflow [skip ci]"
|
||||
git push
|
||||
Reference in New Issue
Block a user