Skip to content

Commit 947c904

Browse files
committed
Upgrade outlines_core to 0.2.11 and update its logits processor/backend
1 parent 16853c6 commit 947c904

22 files changed

+301
-948
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,16 @@ jobs:
5151
echo "::set-output name=id::$MATRIX_ID"
5252
- name: Run tests
5353
run: |
54-
uv run pytest -x --cov=outlines -m 'not api_call'
55-
env:
56-
COVERAGE_FILE: .coverage.${{ steps.matrix-id.outputs.id }}
54+
rm -f .coverage*
55+
uv run coverage erase
56+
uv run python -m coverage run --branch --parallel-mode -m pytest -x -m 'not api_call'
5757
- name: Upload coverage data
5858
uses: actions/upload-artifact@v4
5959
with:
6060
name: coverage-data
6161
path: .coverage.*
6262
if-no-files-found: ignore
6363
include-hidden-files: true
64-
# TODO FIXME: This is only using the last run
6564
overwrite: true
6665

6766
coverage:

examples/parsing.py

Lines changed: 0 additions & 105 deletions
This file was deleted.

outlines/backends/llguidance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import warnings
44
from typing import TYPE_CHECKING
55

6-
from llguidance import LLMatcher
7-
86
from outlines.backends.base import BaseBackend
97
from outlines.models import LlamaCpp, MLXLM, SteerableModel, Transformers
108
from outlines.processors.base_logits_processor import (
@@ -65,6 +63,8 @@ def _setup(self, batch_size: int) -> None:
6563
The batch size of the input
6664
6765
"""
66+
from llguidance import LLMatcher
67+
6868
self.ll_matchers = [
6969
LLMatcher(self.llg_tokenizer, self.grammar)
7070
for _ in range(batch_size)

0 commit comments

Comments
 (0)