Skip to content

5.1.0 Update. Avoid build collisions in the lemonade cache. Improve memory tracking and OGA testing. #217

5.1.0 Update. Avoid build collisions in the lemonade cache. Improve memory tracking and OGA testing.

5.1.0 Update. Avoid build collisions in the lemonade cache. Improve memory tracking and OGA testing. #217

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Lint and Test Lemonade
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
make-lemonade:
env:
LEMONADE_CI_MODE: "True"
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Miniconda with 64-bit Python
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: lemon
python-version: "3.10"
run-post: "false"
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
conda install pylint
python -m pip check
pip install -e .[llm]
- name: Lint with Black
uses: psf/black@stable
with:
options: "--check --verbose"
src: "./src"
- name: Lint with PyLint
shell: bash -el {0}
run: |
pylint src/lemonade --rcfile .pylintrc --disable E0401
pylint examples --rcfile .pylintrc --disable E0401,E0611 --jobs=1
- name: Test HF+CPU server
if: runner.os == 'Windows'
timeout-minutes: 10
uses: ./.github/actions/server-testing
with:
conda_env: -n lemon
load_command: -i facebook/opt-125m huggingface-load
- name: Run lemonade tests
shell: bash -el {0}
run: |
# Test CLI
lemonade -m -i facebook/opt-125m huggingface-load llm-prompt -p "hi" --max-new-tokens 10
# Test low-level APIs
python test/lemonade/llm_api.py
# Test high-level LEAP APIs
python examples/lemonade/leap_basic.py
python examples/lemonade/leap_streaming.py