Skip to content

Commit

Permalink
Re-apply oga testing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfowers committed Feb 4, 2025
1 parent 7dbafe9 commit ba76e97
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test_lemonade_oga_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ jobs:
shell: bash -el {0}
run: |
pylint src/lemonade --rcfile .pylintrc --disable E0401
- name: Test OGA+CPU server
if: runner.os == 'Windows'
timeout-minutes: 10
uses: ./.github/actions/server-testing
with:
conda_env: -n lemon
load_command: -i TinyPixel/small-llama2 oga-load --device cpu --dtype int4
hf_token: "${{ secrets.HUGGINGFACE_ACCESS_TOKEN }}" # Required by OGA model_builder in OGA 0.4.0 but not future versions
- name: Run lemonade tests
shell: bash -el {0}
env:
Expand All @@ -64,4 +56,12 @@ jobs:
# Test high-level LEAP APIs
python examples/lemonade/leap_oga_cpu.py
python examples/lemonade/leap_oga_cpu_streaming.py
- name: Test OGA+CPU server
if: runner.os == 'Windows'
timeout-minutes: 10
uses: ./.github/actions/server-testing
with:
conda_env: -n lemon
load_command: -i TinyPixel/small-llama2 oga-load --device cpu --dtype int4
hf_token: "${{ secrets.HUGGINGFACE_ACCESS_TOKEN }}" # Required by OGA model_builder in OGA 0.4.0 but not future versions

3 changes: 2 additions & 1 deletion test/lemonade/oga_cpu_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from turnkeyml.state import State
import turnkeyml.common.test_helpers as common
import turnkeyml.common.filesystem as fs
from turnkeyml.common.build import builds_dir
from lemonade.tools.ort_genai.oga import OgaLoad
from lemonade.tools.chat import LLMPrompt
from lemonade.tools.mmlu import AccuracyMMLU
Expand All @@ -22,7 +23,7 @@
class Testing(unittest.TestCase):

def setUp(self) -> None:
shutil.rmtree(cache_dir, ignore_errors=True)
shutil.rmtree(builds_dir(cache_dir), ignore_errors=True)

def test_001_ogaload(self):
# Test the OgaLoad and LLMPrompt tools on an NPU model
Expand Down

0 comments on commit ba76e97

Please sign in to comment.