Skip to content

Commit 5dd3eae

Browse files
authored
Speed up tests (openvinotoolkit#1028)
1 parent 2c1c817 commit 5dd3eae

File tree

5 files changed

+16
-25
lines changed

5 files changed

+16
-25
lines changed

.github/workflows/causal_lm_cpp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ jobs:
780780
run: |
781781
source ./ov/setupvars.sh
782782
export PYTHONPATH=./build/:$PYTHONPATH
783-
python ./samples/python/visual_language_chat/visual_language_chat.py ./MiniCPM-V-2_6/ cat_img/cat.jpg <<< $'What is on the image?\nWhat is special on the image?'
783+
./samples/python/visual_language_chat/visual_language_chat.py ./MiniCPM-V-2_6/ cat_img/cat.jpg <<< $'What is on the image?\nWhat is special on the image?'
784784
timeout-minutes: 2
785785

786786
cpp-continuous-batching-ubuntu:

.github/workflows/linux.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
echo 'Acquire::Retries "10";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
7979
echo 'APT::Get::Assume-Yes "true";' | sudo tee -a /etc/apt/apt.conf.d/81-assume-yes > /dev/null
8080
echo 'APT::Get::Fix-Broken "true";' | sudo tee -a /etc/apt/apt.conf.d/82-fix-broken > /dev/null
81-
echo 'APT::Get::no-install-recommends "true";' | sudo tee -a /etc/apt/apt.conf.d/83-no-reсommends > /dev/null
81+
echo 'APT::Get::no-install-recommends "true";' | sudo tee -a /etc/apt/apt.conf.d/83-no-recommends > /dev/null
8282
8383
- name: Clone OpenVINO
8484
uses: actions/checkout@v4
@@ -232,7 +232,7 @@ jobs:
232232
echo 'Acquire::Retries "10";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
233233
echo 'APT::Get::Assume-Yes "true";' | sudo tee -a /etc/apt/apt.conf.d/81-assume-yes > /dev/null
234234
echo 'APT::Get::Fix-Broken "true";' | sudo tee -a /etc/apt/apt.conf.d/82-fix-broken > /dev/null
235-
echo 'APT::Get::no-install-recommends "true";' | sudo tee -a /etc/apt/apt.conf.d/83-no-reсommends > /dev/null
235+
echo 'APT::Get::no-install-recommends "true";' | sudo tee -a /etc/apt/apt.conf.d/83-no-recommends > /dev/null
236236
237237
- name: Install build dependencies
238238
run: |
@@ -268,7 +268,7 @@ jobs:
268268
run: |
269269
source ${OV_INSTALL_DIR}/setupvars.sh
270270
python -m pip install . --verbose --find-links ${OV_INSTALL_DIR}/wheels
271-
python -m pytest ./tests/python_tests --ignore ./tests/python_tests/test_whisper_generate_api.py --ignore ./tests/python_tests/test_vlm_api.py
271+
python -m pytest ./tests/python_tests --ignore ./tests/python_tests/test_whisper_generate_api.py --ignore ./tests/python_tests/test_vlm_api.py -k "not test_set_chat_template"
272272
273273
- run: python -m pip install git+https://github.com/eaidova/optimum-intel.git@ea/minicpmv
274274
- run: python -m pip install -U "optimum<1.23" --no-dependencies
@@ -325,7 +325,7 @@ jobs:
325325
echo 'Acquire::Retries "10";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
326326
echo 'APT::Get::Assume-Yes "true";' | sudo tee -a /etc/apt/apt.conf.d/81-assume-yes > /dev/null
327327
echo 'APT::Get::Fix-Broken "true";' | sudo tee -a /etc/apt/apt.conf.d/82-fix-broken > /dev/null
328-
echo 'APT::Get::no-install-recommends "true";' | sudo tee -a /etc/apt/apt.conf.d/83-no-reсommends > /dev/null
328+
echo 'APT::Get::no-install-recommends "true";' | sudo tee -a /etc/apt/apt.conf.d/83-no-recommends > /dev/null
329329
330330
- name: Install build dependencies
331331
run: |
@@ -347,7 +347,7 @@ jobs:
347347
run: |
348348
source ${OV_INSTALL_DIR}/setupvars.sh
349349
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
350-
cmake --build ./build/ --config Release -j
350+
cmake --build ./build/ --config Release --target py_generate_pipeline -j
351351
352352
- name: Test bindings
353353
run: |
@@ -361,7 +361,7 @@ jobs:
361361
run: |
362362
source ${OV_INSTALL_DIR}/setupvars.sh
363363
python -m pip install . --verbose --find-links ${OV_INSTALL_DIR}/wheels
364-
python -m pytest ./tests/python_tests/test_whisper_generate_api.py
364+
python -m pytest ./tests/python_tests/test_whisper_generate_api.py -k "not test_smoke"
365365
366366
genai_package:
367367
name: OpenVINO genai extension (install to OpenVINO package)

.github/workflows/mac.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ jobs:
235235
source ${OV_INSTALL_DIR}/setupvars.sh
236236
python -m pip install . --verbose --find-links ${OV_INSTALL_DIR}/wheels
237237
python -c "from openvino_genai import LLMPipeline"
238-
python -m pytest ./tests/python_tests/ --ignore ./tests/python_tests/test_whisper_generate_api.py --ignore ./tests/python_tests/test_vlm_api.py
238+
python -m pytest ./tests/python_tests/ --ignore ./tests/python_tests/test_whisper_generate_api.py --ignore ./tests/python_tests/test_vlm_api.py -k "not test_set_chat_template"
239239
240240
genai_python_lib_whisper:
241241
name: OpenVINO genai extension whisper tests (cmake + wheel)
@@ -284,7 +284,7 @@ jobs:
284284
run: |
285285
source ${OV_INSTALL_DIR}/setupvars.sh
286286
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
287-
cmake --build ./build/ --config Release -j
287+
cmake --build ./build/ --config Release --target py_generate_pipeline -j
288288
289289
- name: Test bindings
290290
run: |
@@ -299,7 +299,7 @@ jobs:
299299
source ${OV_INSTALL_DIR}/setupvars.sh
300300
python -m pip install . --verbose --find-links ${OV_INSTALL_DIR}/wheels
301301
python -c "from openvino_genai import LLMPipeline"
302-
python -m pytest ./tests/python_tests/test_whisper_generate_api.py
302+
python -m pytest ./tests/python_tests/test_whisper_generate_api.py -k "not test_smoke"
303303
304304
genai_package:
305305
name: OpenVINO genai extension (install to OpenVINO package)

.github/workflows/windows.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ jobs:
245245
run: |
246246
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
247247
python -m pip install . --verbose
248-
python -m pytest ./tests/python_tests/ --ignore ./tests/python_tests/test_whisper_generate_api.py --ignore ./tests/python_tests/test_vlm_api.py
248+
python -m pytest ./tests/python_tests/ --ignore ./tests/python_tests/test_whisper_generate_api.py --ignore ./tests/python_tests/test_vlm_api.py -k "not test_set_chat_template"
249249
250250
genai_python_lib_whisper:
251251
name: OpenVINO genai extension whisper tests (cmake + wheel)
@@ -295,7 +295,7 @@ jobs:
295295
run: |
296296
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
297297
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
298-
cmake --build ./build/ --config Release -j
298+
cmake --build ./build/ --config Release --target py_generate_pipeline -j
299299
300300
- name: Test bindings
301301
run: |
@@ -309,8 +309,7 @@ jobs:
309309
run: |
310310
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
311311
python -m pip install . --verbose
312-
python -m pytest ./tests/python_tests/test_whisper_generate_api.py
313-
312+
python -m pytest ./tests/python_tests/test_whisper_generate_api.py -k "not test_smoke"
314313
315314
genai_python_lib_vlm:
316315
name: OpenVINO genai VLM tests (cmake + wheel)
@@ -360,7 +359,7 @@ jobs:
360359
run: |
361360
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
362361
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
363-
cmake --build ./build/ --config Release -j
362+
cmake --build ./build/ --config Release --target py_generate_pipeline -j
364363
365364
- name: Test bindings
366365
run: |
@@ -372,13 +371,6 @@ jobs:
372371
env:
373372
PYTHONPATH: "./build/" # cmd evaluates variables in a different way. Setting PYTHONPATH before setupvars.bat instead of doing that after solves that.
374373

375-
- name: Test bindings (wheel)
376-
run: |
377-
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
378-
python -m pip install . --verbose
379-
python -m pytest ./tests/python_tests/test_vlm_api.py
380-
381-
382374
genai_package:
383375
name: OpenVINO genai extension (install to OpenVINO package)
384376
strategy:

samples/cpp/visual_language_chat/visual_language_chat.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "load_image.hpp"
55
#include <openvino/genai/visual_language/pipeline.hpp>
66
#include <filesystem>
7-
#include <openvino/runtime/intel_gpu/properties.hpp>
87

98
bool print_subword(std::string&& subword) {
109
return !(std::cout << subword << std::flush);
@@ -15,7 +14,7 @@ int main(int argc, char* argv[]) try {
1514
throw std::runtime_error(std::string{"Usage "} + argv[0] + " <MODEL_DIR> <IMAGE_FILE OR DIR_WITH_IMAGES>");
1615
}
1716

18-
std::vector<ov::Tensor> images = utils::load_images(argv[2]);
17+
std::vector<ov::Tensor> rgbs = utils::load_images(argv[2]);
1918

2019
ov::genai::GenerationConfig generation_config;
2120
generation_config.max_new_tokens = 100;
@@ -35,7 +34,7 @@ int main(int argc, char* argv[]) try {
3534

3635
std::getline(std::cin, prompt);
3736
pipe.generate(prompt,
38-
ov::genai::images(images),
37+
ov::genai::images(rgbs),
3938
ov::genai::generation_config(generation_config),
4039
ov::genai::streamer(print_subword));
4140
std::cout << "\n----------\n"

0 commit comments

Comments
 (0)