Skip to content

[Draft/Experimental] Add abstraction layer ("Client") between Model and Engine #238

[Draft/Experimental] Add abstraction layer ("Client") between Model and Engine

[Draft/Experimental] Add abstraction layer ("Client") between Model and Engine #238

Workflow file for this run

name: pull_request
on:
push:
pull_request:
workflow_dispatch:
inputs:
commit_id:
description: 'Branch or Commit ID (optional)'
required: false
type: string
schedule:
# Run at 11:00 UTC every day
- cron: "00 11 * * *"
jobs:
unit_tests:
strategy:
fail-fast: false # Don't cancel all on first failure
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Minimal install
run: |
python -m pip install --upgrade pip
python -m pip install -e .
- name: Attempt import
run: |
python -c "import guidance"
- name: Bigger install
run: |
python -m pip install -e .[unittest]
- name: Unit Tests
run: |
pytest -vv ./tests/unit
server_tests:
strategy:
fail-fast: false # Don't cancel all on first failure
matrix:
os: ["ubuntu-latest"]
python-version: ["3.12"]
uses: ./.github/workflows/call_server_tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
cpu_tests:
strategy:
fail-fast: false # Don't cancel all on first failure
matrix:
os: ["Large_Linux", "Large_Windows"]
python-version: ["3.9", "3.12"]
model:
- "transformers_gpt2_cpu"
- "llamacpp_phi3_mini_4k_instruct_cpu"
uses: ./.github/workflows/call_cpu_tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
model: ${{ matrix.model }}
gpu_tests:
strategy:
fail-fast: false # Don't cancel all on first failure
matrix:
os: ["gpu-runner"]
python-version: ["3.9", "3.12"]
model:
- "transformers_gpt2_gpu"
- "llamacpp_llama2_7b_gpu"
uses: ./.github/workflows/call_gpu_tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
model: ${{ matrix.model }}