mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-24 08:28:04 +00:00
feat(ci): add support for running vision inference tests
This commit is contained in:
parent
d6ae2b0f47
commit
0b02af792d
4 changed files with 227 additions and 0 deletions
20
.github/actions/run-integration-tests/action.yml
vendored
20
.github/actions/run-integration-tests/action.yml
vendored
|
|
@ -14,6 +14,10 @@ inputs:
|
|||
inference-mode:
|
||||
description: 'Inference mode: "record" or "replay"'
|
||||
required: true
|
||||
run-vision-tests:
|
||||
description: 'Run vision tests: "true" or "false"'
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
outputs:
|
||||
logs-path:
|
||||
|
|
@ -46,6 +50,22 @@ runs:
|
|||
EXCLUDE_TESTS="${EXCLUDE_TESTS} or test_inference_store_tool_calls"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.run-vision-tests }}" == "true" ]; then
|
||||
if uv run pytest -s -v tests/integration/inference/test_vision_inference.py --stack-config=${stack_config} \
|
||||
-k "not( ${EXCLUDE_TESTS} )" \
|
||||
--vision-model=ollama/llama3.2-vision:11b \
|
||||
--embedding-model=sentence-transformers/all-MiniLM-L6-v2 \
|
||||
--color=yes ${EXTRA_PARAMS} \
|
||||
--capture=tee-sys | tee pytest-${{ inputs.inference-mode }}-vision.log; then
|
||||
echo "✅ Tests completed for vision"
|
||||
else
|
||||
echo "❌ Tests failed for vision"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TEST_TYPES='${{ inputs.test-types }}'
|
||||
echo "Test types to run: $TEST_TYPES"
|
||||
|
||||
|
|
|
|||
11
.github/actions/setup-vision-ollama/action.yml
vendored
Normal file
11
.github/actions/setup-vision-ollama/action.yml
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
name: Setup Ollama for Vision Tests
|
||||
description: Start Ollama with vision model
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Start Ollama
|
||||
shell: bash
|
||||
run: |
|
||||
docker run -d --name ollama -p 11434:11434 docker.io/llamastack/ollama-with-vision-model
|
||||
echo "Verifying Ollama status..."
|
||||
timeout 30 bash -c 'while ! curl -s -L http://127.0.0.1:11434; do sleep 1 && echo "."; done'
|
||||
Loading…
Add table
Add a link
Reference in a new issue