From 67620f780b49176ba7ab64288e19da47068a37ff Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Mon, 18 Aug 2025 13:42:44 -0600 Subject: [PATCH] test 4 - GitHub Actions --- ...rag_and_cot_apple_openelm_3b_instruct.yml} | 21 +++------ ...rag_and_cot_meta_llama_3_2_3b_instruct.yml | 43 +++++++++++++++++++ ...nd_cot_microsoft_phi_3_mini4k_instruct.yml | 43 +++++++++++++++++++ 3 files changed, 92 insertions(+), 15 deletions(-) rename .github/workflows/{guidelines_test_04.yml => test_04_malicious_prompts_rag_and_cot_apple_openelm_3b_instruct.yml} (61%) create mode 100644 .github/workflows/test_04_malicious_prompts_rag_and_cot_meta_llama_3_2_3b_instruct.yml create mode 100644 .github/workflows/test_04_malicious_prompts_rag_and_cot_microsoft_phi_3_mini4k_instruct.yml diff --git a/.github/workflows/guidelines_test_04.yml b/.github/workflows/test_04_malicious_prompts_rag_and_cot_apple_openelm_3b_instruct.yml similarity index 61% rename from .github/workflows/guidelines_test_04.yml rename to .github/workflows/test_04_malicious_prompts_rag_and_cot_apple_openelm_3b_instruct.yml index a910b78fd..bb9ab7f66 100644 --- a/.github/workflows/guidelines_test_04.yml +++ b/.github/workflows/test_04_malicious_prompts_rag_and_cot_apple_openelm_3b_instruct.yml @@ -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 diff --git a/.github/workflows/test_04_malicious_prompts_rag_and_cot_meta_llama_3_2_3b_instruct.yml b/.github/workflows/test_04_malicious_prompts_rag_and_cot_meta_llama_3_2_3b_instruct.yml new file mode 100644 index 000000000..ddc7f188f --- /dev/null +++ b/.github/workflows/test_04_malicious_prompts_rag_and_cot_meta_llama_3_2_3b_instruct.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_04_malicious_prompts_rag_and_cot_microsoft_phi_3_mini4k_instruct.yml b/.github/workflows/test_04_malicious_prompts_rag_and_cot_microsoft_phi_3_mini4k_instruct.yml new file mode 100644 index 000000000..d6ae2e799 --- /dev/null +++ b/.github/workflows/test_04_malicious_prompts_rag_and_cot_microsoft_phi_3_mini4k_instruct.yml @@ -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 \ No newline at end of file