Skip to content

Commit f8cc4f1

Browse files
Fix examples (#323)
1 parent 61a0808 commit f8cc4f1

24 files changed

+84
-135
lines changed

.github/workflows/test_api_cpu.yaml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,3 @@ jobs:
5555
env:
5656
HF_TOKEN: ${{ secrets.HF_TOKEN }}
5757
PUSH_REPO_ID: optimum-benchmark/cpu
58-
59-
# no examples for now
60-
# - if: ${{
61-
# (github.event_name == 'push') ||
62-
# (github.event_name == 'workflow_dispatch') ||
63-
# contains( github.event.pull_request.labels.*.name, 'examples')
64-
# }}
65-
# name: Run examples
66-
# run: |
67-
# pytest tests/test_examples.py -s -k "api and cpu"
68-
# env:
69-
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
70-
# PUSH_REPO_ID: optimum-benchmark/cpu

.github/workflows/test_api_cuda.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,10 @@ jobs:
5151
HF_TOKEN: ${{ secrets.HF_TOKEN }}
5252
PUSH_REPO_ID: optimum-benchmark/cuda
5353

54-
- if: ${{
55-
(github.event_name == 'push') ||
56-
(github.event_name == 'workflow_dispatch') ||
57-
contains( github.event.pull_request.labels.*.name, 'examples')
58-
}}
59-
name: Run examples
54+
- name: Run examples
6055
run: |
6156
pip install -e .[testing,torchao,gptqmodel]
62-
pytest tests/test_examples.py -x -s -k "api and cuda and pytorch"
57+
pytest tests/test_examples.py -x -s -k "api and cuda"
6358
env:
6459
HF_TOKEN: ${{ secrets.HF_TOKEN }}
6560
PUSH_REPO_ID: optimum-benchmark/cuda

.github/workflows/test_cli_cpu_ipex.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,5 @@ jobs:
5353
- name: Run tests
5454
run: pytest tests/test_cli.py -s -k "cli and cpu and ipex"
5555

56-
- if: ${{
57-
(github.event_name == 'push') ||
58-
(github.event_name == 'workflow_dispatch') ||
59-
contains( github.event.pull_request.labels.*.name, 'examples')
60-
}}
61-
name: Run examples
56+
- name: Run examples
6257
run: pytest tests/test_examples.py -s -k "cli and cpu and ipex"

.github/workflows/test_cli_cpu_llama_cpp.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,5 @@ jobs:
5353
- name: Run tests
5454
run: pytest tests/test_cli.py -s -k "cli and cpu and llama_cpp"
5555

56-
- if: ${{
57-
(github.event_name == 'push') ||
58-
(github.event_name == 'workflow_dispatch') ||
59-
contains( github.event.pull_request.labels.*.name, 'examples')
60-
}}
61-
name: Run examples
56+
- name: Run examples
6257
run: pytest tests/test_examples.py -s -k "cli and cpu and llama_cpp"

.github/workflows/test_cli_cpu_onnxruntime.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,5 @@ jobs:
5353
- name: Run tests
5454
run: pytest tests/test_cli.py -s -k "cli and cpu and onnxruntime"
5555

56-
- if: ${{
57-
(github.event_name == 'push') ||
58-
(github.event_name == 'workflow_dispatch') ||
59-
contains( github.event.pull_request.labels.*.name, 'examples')
60-
}}
61-
name: Run examples
56+
- name: Run examples
6257
run: pytest tests/test_examples.py -s -k "cli and cpu and onnxruntime"

.github/workflows/test_cli_cpu_openvino.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,5 @@ jobs:
5353
- name: Run tests
5454
run: pytest tests/test_cli.py -s -k "cli and cpu and openvino"
5555

56-
- if: ${{
57-
(github.event_name == 'push') ||
58-
(github.event_name == 'workflow_dispatch') ||
59-
contains( github.event.pull_request.labels.*.name, 'examples')
60-
}}
61-
name: Run examples
56+
- name: Run examples
6257
run: pytest tests/test_examples.py -s -k "cli and cpu and openvino"

.github/workflows/test_cli_cpu_py_txi.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,9 @@ jobs:
4646
pip install uv
4747
uv pip install --upgrade pip
4848
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
49-
uv pip install -e .[testing,py-txi] git+https://github.com/IlyasMoutawwakil/py-txi.git
49+
uv pip install -e .[testing,py-txi]
5050
env:
5151
UV_SYSTEM_PYTHON: 1
5252

5353
- name: Run tests
5454
run: pytest tests/test_cli.py -s -k "cli and cpu and py_txi"
55-
56-
# no examples for now
57-
# - if: ${{
58-
# (github.event_name == 'push') ||
59-
# (github.event_name == 'workflow_dispatch') ||
60-
# contains( github.event.pull_request.labels.*.name, 'examples')
61-
# }}
62-
# name: Run examples
63-
# run: pytest tests/test_examples.py -s -k "cli and cpu and (tgi or tei)"

.github/workflows/test_cli_cpu_pytorch.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,3 @@ jobs:
5252

5353
- name: Run tests
5454
run: pytest tests/test_cli.py -s -k "cli and cpu and pytorch"
55-
56-
# no examples for now
57-
# - if: ${{
58-
# (github.event_name == 'push') ||
59-
# (github.event_name == 'workflow_dispatch') ||
60-
# contains( github.event.pull_request.labels.*.name, 'examples')
61-
# }}
62-
# name: Run examples
63-
# run: pytest tests/test_examples.py -s -k "cli and cpu and pytorch"

.github/workflows/test_cli_cuda_onnxruntime.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,3 @@ jobs:
4848
- name: Run tests
4949
run: |
5050
pytest tests/test_cli.py -x -s -k "cli and cuda and onnxruntime"
51-
52-
# no examples for now
53-
# - if: ${{
54-
# (github.event_name == 'push') ||
55-
# (github.event_name == 'workflow_dispatch') ||
56-
# contains( github.event.pull_request.labels.*.name, 'examples')
57-
# }}
58-
# name: Run examples
59-
# run: pytest tests/test_examples.py -x -s -k "cli and cuda and onnxruntime"

.github/workflows/test_cli_cuda_py_txi.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,14 @@ jobs:
4747
pip install uv
4848
uv pip install --upgrade pip
4949
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
50-
uv pip install -e .[testing,py-txi] git+https://github.com/IlyasMoutawwakil/py-txi.git
50+
uv pip install -e .[testing,py-txi]
5151
env:
5252
UV_SYSTEM_PYTHON: 1
5353

5454
- name: Run tests
5555
run: |
5656
FORCE_SEQUENTIAL=1 pytest tests/test_cli.py -x -s -k "cli and cuda and py_txi"
5757
58-
- if: ${{
59-
(github.event_name == 'push') ||
60-
(github.event_name == 'workflow_dispatch') ||
61-
contains( github.event.pull_request.labels.*.name, 'examples')
62-
}}
63-
name: Run examples
58+
- name: Run examples
6459
run: |
6560
FORCE_SEQUENTIAL=1 pytest tests/test_examples.py -x -s -k "cli and cuda and (tgi or tei)"

0 commit comments

Comments
 (0)