forked from microsoft/Olive
-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (44 loc) · 1.71 KB
/
Copy pathtest-model-fast.yml
File metadata and controls
51 lines (44 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This job is run as a github action.
# It checks Olive works on random and small models.
name: Test model fast
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ubuntu-test-model-fast:
name: Ubuntu test model fast
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
python -m pip install -r test/requirements-test-cpu.txt
- name: Create llama_env and install llama-cpp-python
run: |
LLAMA_ENV="$(pwd)/llama_env"
python -m venv "$LLAMA_ENV"
"$LLAMA_ENV/bin/pip" install --upgrade pip
"$LLAMA_ENV/bin/pip" install gguf safetensors llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
"$LLAMA_ENV/bin/pip" install transformers sentencepiece protobuf tabulate gguf
git clone --depth=1 --filter=blob:none --sparse https://github.com/ggerganov/llama.cpp.git /tmp/llama_cpp_repo
git -C /tmp/llama_cpp_repo sparse-checkout set convert_hf_to_gguf.py conversion --skip-checks
cp /tmp/llama_cpp_repo/convert_hf_to_gguf.py "$LLAMA_ENV/"
cp -r /tmp/llama_cpp_repo/conversion "$LLAMA_ENV/"
- name: pip freeze
run: |
python -m pip freeze
- name: Run fast test
run: |
python -m pytest -v -s -p no:warnings --disable-warnings --log-cli-level=WARNING test/cli/test_cli_test_model_smoke.py test/cli/test_cli_whisper_smoke.py