Skip to content

Commit 556ee09

Browse files
authored
Disable Outlines llama.cpp tests (#3498)
1 parent 733b8bf commit 556ee09

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ jobs:
157157
env:
158158
CI: true
159159
COVERAGE_PROCESS_START: ./pyproject.toml
160+
# We only run the llama_cpp tests on the latest Python as they have been regularly failing in CI with `Fatal Python error: Illegal instruction`:
161+
# https://github.com/pydantic/pydantic-ai/actions/runs/19547773220/job/55970947389
162+
RUN_LLAMA_CPP_TESTS: ${{ matrix.python-version == '3.13' && matrix.install.name == 'all-extras' }}
160163
steps:
161164
- uses: actions/checkout@v4
162165

@@ -207,6 +210,7 @@ jobs:
207210
env:
208211
CI: true
209212
COVERAGE_PROCESS_START: ./pyproject.toml
213+
RUN_LLAMA_CPP_TESTS: false
210214
steps:
211215
- uses: actions/checkout@v4
212216

tests/models/test_outlines.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from __future__ import annotations as _annotations
77

88
import json
9+
import os
910
from collections.abc import Callable
1011
from pathlib import Path
1112
from typing import Any
@@ -80,8 +81,11 @@
8081
not transformer_imports_successful(), reason='transformers not available'
8182
)
8283

84+
# We only run this on the latest Python as the llama_cpp tests have been regularly failing in CI with `Fatal Python error: Illegal instruction`:
85+
# https://github.com/pydantic/pydantic-ai/actions/runs/19547773220/job/55970947389
8386
skip_if_llama_cpp_imports_unsuccessful = pytest.mark.skipif(
84-
not llama_cpp_imports_successful(), reason='llama_cpp not available'
87+
not llama_cpp_imports_successful() or os.getenv('RUN_LLAMA_CPP_TESTS', 'true').lower() == 'false',
88+
reason='llama_cpp not available',
8589
)
8690

8791
skip_if_vllm_imports_unsuccessful = pytest.mark.skipif(not vllm_imports_successful(), reason='vllm not available')

0 commit comments

Comments
 (0)