teddy06894
11/13/2024, 10:37 AMteddy06894
11/13/2024, 1:46 PMnpx but I’m having some problems with the cacheteddy06894
11/13/2024, 1:47 PMyaml
---
name: Evaluate
on: workflow_dispatch
jobs:
eval:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Use Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Create cache directory
run: mkdir -p ~/.cache/promptfoo
- name: Set up promptfoo cache
id: cache-promptfoo
uses: actions/cache@v4
with:
path: ~/.cache/promptfoo
key: ${{ runner.os }}-promptfoo-v1-${{ hashFiles('**/promptfooconfig.yaml') }}
restore-keys: |
${{ runner.os }}-promptfoo-v1-
${{ runner.os }}-promptfoo-
- name: Check cache status
run: echo "Cache hit - ${{ steps.cache-promptfoo.outputs.cache-hit }}"
- name: Runs the promptfoo evaluation
run: npx promptfoo@latest eval -c promptfooconfig.yaml -o output.json
env:
PROMPTFOO_CACHE_PATH: ~/.cache/promptfoo
PROMPTFOO_DISABLE_TELEMETRY: 1
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PROMPTFOO_FAILED_TEST_EXIT_CODE: 0teddy06894
11/13/2024, 1:48 PMCreating cache folder at ~/.cache/promptfooteddy06894
11/13/2024, 8:46 PMteddy06894
11/15/2024, 10:42 PMteddy06894
11/27/2024, 7:27 AMmichaelmichaelmichael
11/27/2024, 3:18 PMname: Evaluate
on: workflow_dispatch
jobs:
eval:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Use Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up promptfoo cache
id: cache-promptfoo
uses: actions/cache@v4
with:
path: |
~/.cache/promptfoo
~/.promptfoo
key: ${{ runner.os }}-promptfoo-v2-${{ hashFiles('**/promptfooconfig.yaml') }}
restore-keys: |
${{ runner.os }}-promptfoo-v2-
- name: Runs the promptfoo evaluation
run: npx promptfoo@latest eval -c promptfooconfig.yaml -o output.json
env:
PROMPTFOO_CACHE_PATH: ~/.cache/promptfoo
PROMPTFOO_DISABLE_TELEMETRY: 1
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PROMPTFOO_FAILED_TEST_EXIT_CODE: 0
this
1. Removes manual cache directory creation (unnecessary)
2. Adds ~/.promptfoo to cache paths