Skip to content

Commit 6f6d7c7

Browse files
authored
chore: Add steps logging parameters and LLM cache in eval run (#1110)
chore: Add task in eval run to log test size and sha, and log before/after snapshots of LLM cache.
1 parent 91c33a8 commit 6f6d7c7

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

.github/workflows/evals.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ env:
2828

2929
jobs:
3030
evals:
31-
name: "Evals"
31+
name: Evals
3232
runs-on: ubuntu-latest
3333
environment: seeder
3434
services:
@@ -42,6 +42,12 @@ jobs:
4242
--health-timeout 5s
4343
--health-retries 5
4444
steps:
45+
- name: ✏️ Log Eval Run Metadata
46+
run: |
47+
echo "Running Evals:"
48+
echo "- Size: ${{ env.test_size }} charms"
49+
echo "- SHA: ${{ env.target_sha }}"
50+
4551
# TODO Upload `seeder` as a deno executable to avoid
4652
# running from source.
4753
- name: 📥 Checkout repository
@@ -100,6 +106,13 @@ jobs:
100106
key: llm-cache-${{ github.run_id }}
101107
restore-keys: llm-cache
102108

109+
- name: ✏️ List LLM Cache Load
110+
run: |
111+
mkdir -p ./llm_cache_dir/llm-api-cache
112+
ls -1 ./llm_cache_dir/llm-api-cache > ./cache-log-pre
113+
echo "$(cat ./cache-log-pre | wc -l) items found in cache."
114+
cat ./cache-log-pre
115+
103116
- name: 🚀 Start Toolshed server
104117
run: |
105118
mkdir -p ./llm_cache_dir
@@ -129,6 +142,25 @@ jobs:
129142
OPENAI_API_KEY=${{ secrets.CTTS_AI_LLM_OPENAI_API_KEY }} \
130143
deno task start --name ${{ env.target_sha }} $FLAGS
131144
145+
- name: ✏️ List LLM Cache Save
146+
run: |
147+
mkdir -p ./llm_cache_dir/llm-api-cache
148+
ls -1 ./llm_cache_dir/llm-api-cache > ./cache-log-post
149+
echo "$(cat ./cache-log-post | wc -l) items found in cache."
150+
cat ./cache-log-post
151+
152+
- name: 📦 LLM Cache Status
153+
run: |
154+
diff ./cache-log-pre ./cache-log-post > ./cache-analysis-diff
155+
RESULT=$?
156+
if [ $RESULT -eq 0 ]; then
157+
echo "No new LLM cache entries added!"
158+
else
159+
# `diff` outputs two lines per diff, one for location, one for content
160+
ADDITIONS=$(cat ./cache_analysis-diff | wc -l)
161+
echo "LLM cache has added $((ADDITIONS / 2)) entries."
162+
fi
163+
132164
- name: 📤 Upload reports
133165
uses: actions/upload-artifact@v4
134166
with:

0 commit comments

Comments
 (0)