From 0f1c1cc7e8e257199e3f7db774b844bb1118fe2a Mon Sep 17 00:00:00 2001 From: Artur Paniukov Date: Fri, 17 Nov 2023 17:11:46 +0000 Subject: [PATCH] Add ChatGLM detokenization and tests --- modules/custom_operations/tests/run_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/custom_operations/tests/run_tests.py b/modules/custom_operations/tests/run_tests.py index 984e70263..365feb507 100644 --- a/modules/custom_operations/tests/run_tests.py +++ b/modules/custom_operations/tests/run_tests.py @@ -1,5 +1,6 @@ # Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +from pathlib import Path from openvino.runtime import Core from openvino.tools.mo import convert_model @@ -7,6 +8,13 @@ import pytest import numpy as np import os +import sys + + +ext_path_dir = Path(os.getenv('CUSTOM_OP_LIB')).parent +if sys.platform == "win32": + # On Windows, with Python >= 3.8, DLLs are no longer imported from the PATH. + os.add_dll_directory(str(ext_path_dir.absolute())) def run_test(ref_inputs, ref_res, test_onnx=False, threshold=1e-5):