Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ jobs:
env:
CI: true
COVERAGE_PROCESS_START: ./pyproject.toml
# 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`:
# https://github.com/pydantic/pydantic-ai/actions/runs/19547773220/job/55970947389
RUN_LLAMA_CPP_TESTS: ${{ matrix.python-version == '3.13' && matrix.install.name == 'all-extras' }}
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -207,6 +210,7 @@ jobs:
env:
CI: true
COVERAGE_PROCESS_START: ./pyproject.toml
RUN_LLAMA_CPP_TESTS: false
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 5 additions & 1 deletion tests/models/test_outlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from __future__ import annotations as _annotations

import json
import os
from collections.abc import Callable
from pathlib import Path
from typing import Any
Expand Down Expand Up @@ -80,8 +81,11 @@
not transformer_imports_successful(), reason='transformers not available'
)

# 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`:
# https://github.com/pydantic/pydantic-ai/actions/runs/19547773220/job/55970947389
skip_if_llama_cpp_imports_unsuccessful = pytest.mark.skipif(
not llama_cpp_imports_successful(), reason='llama_cpp not available'
not llama_cpp_imports_successful() or os.getenv('RUN_LLAMA_CPP_TESTS', 'true').lower() == 'false',
reason='llama_cpp not available',
)

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