From 501cb8ba18ba2ceba6760ee96121d3aad68fb663 Mon Sep 17 00:00:00 2001 From: Wovchena Date: Mon, 27 May 2024 18:03:13 +0400 Subject: [PATCH] get openvino_tokenizers._ext_path --- tests/python_tests/test_generate_api.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/python_tests/test_generate_api.py b/tests/python_tests/test_generate_api.py index e7f9adf5d5..1a5e05817c 100644 --- a/tests/python_tests/test_generate_api.py +++ b/tests/python_tests/test_generate_api.py @@ -1,6 +1,7 @@ # Copyright (C) 2023-2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +import openvino_tokenizers import pytest from list_test_models import models_list @@ -31,10 +32,7 @@ def run_hf_ov_genai_comparison(model_fixture, generation_config, prompt): device = 'CPU' # pipe = ov_genai.LLMPipeline(path, device) - import os - build_dir = os.getenv('GENAI_BUILD_DIR', 'build') - ov_tokenizers_path = f'{build_dir}/openvino_tokenizers/src/' - pipe = ov_genai.LLMPipeline(path, device, {}, ov_tokenizers_path) + pipe = ov_genai.LLMPipeline(path, device, {}, str(openvino_tokenizers._ext_path)) ov_output = pipe.generate(prompt, **generation_config)