Skip to content

Commit 865499b

Browse files
committed
See if ollama is cached
1 parent 4bbbd8b commit 865499b

File tree

4 files changed

+32
-11
lines changed

4 files changed

+32
-11
lines changed

.github/actions/run-examples/action.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ runs:
4848
uses: actions/setup-python@v5
4949
with:
5050
python-version: ${{ inputs.python-version }}
51-
- name: Cache pip
52-
uses: actions/cache@v4
53-
with:
54-
# This path is specific to Ubuntu
55-
path: ${{ env.pythonLocation }}
56-
# Look to see if there is a cache hit for the setup file
57-
key: ${{ inputs.runner-os }}-pip-new3-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
58-
restore-keys: |
59-
${{ inputs.runner-os }}-pip-new3
60-
${{ inputs.runner-os }}-new3
51+
# - name: Cache pip
52+
# uses: actions/cache@v4
53+
# with:
54+
# # This path is specific to Ubuntu
55+
# path: ${{ env.pythonLocation }}
56+
# # Look to see if there is a cache hit for the setup file
57+
# key: ${{ inputs.runner-os }}-pip-new3-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
58+
# restore-keys: |
59+
# ${{ inputs.runner-os }}-pip-new3
60+
# ${{ inputs.runner-os }}-new3
6161
- name: Install dependencies
6262
shell: bash
6363
run: pip install --upgrade --upgrade-strategy eager .[all]

.github/workflows/run-examples-prep.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,26 @@ jobs:
4545
echo "value=$value"
4646
echo "update_results=$value" >> $GITHUB_OUTPUT
4747
# Install yq if needed
48+
49+
# Cache Ollama before running examples
50+
- name: Restore Ollama model cache
51+
uses: actions/cache@v4
52+
with:
53+
path: ~/.ollama
54+
key: ollama-cache-${{ runner.os }}-llama3
55+
restore-keys: ollama-cache-${{ runner.os }}
56+
57+
# Cache pip before running examples
58+
- name: Cache pip
59+
uses: actions/cache@v4
60+
with:
61+
# This path is specific to Ubuntu
62+
path: ${{ env.pythonLocation }}
63+
# Look to see if there is a cache hit for the setup file
64+
key: ${{ runner.os }}-pip-new3-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
65+
restore-keys: |
66+
${{ runner.os }}-pip-new3
67+
${{ runner.os }}-new3
4868
4969
- uses: ./.github/actions/run-examples
5070
if: ${{ steps.changed-pdl-files.outputs.all_changed_files_count > 0 }}

examples/chatbot/chatbot.pdl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ text:
55
message: "What is your query?\n"
66
- repeat:
77
text:
8+
- Hello
89
# Send context to Granite model hosted at ollama
910
- model: ollama_chat/granite3.2:2b
1011
# Allow the user to type 'yes', 'no', or anything else, storing

tests/test_examples_run.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
update_results: false
1+
update_results: true
22
check: []
33
skip:
44
- examples/cldk/cldk-assistant.pdl

0 commit comments

Comments
 (0)