From fdefb9d60f28b55f93f5ca48345da85d909aa7ad Mon Sep 17 00:00:00 2001 From: VincyZhang Date: Wed, 10 Jan 2024 17:13:54 +0800 Subject: [PATCH] fix nightly ut (#1125) --- .../nightly/finetuning}/test_finetuning_data.py | 17 +++++++++++++++++ tests/CI/test_quantization_qa_ipex.py | 5 ++++- 2 files changed, 21 insertions(+), 1 deletion(-) rename {tests/Nightly => intel_extension_for_transformers/neural_chat/tests/nightly/finetuning}/test_finetuning_data.py (88%) diff --git a/tests/Nightly/test_finetuning_data.py b/intel_extension_for_transformers/neural_chat/tests/nightly/finetuning/test_finetuning_data.py similarity index 88% rename from tests/Nightly/test_finetuning_data.py rename to intel_extension_for_transformers/neural_chat/tests/nightly/finetuning/test_finetuning_data.py index 158e73a73b0..b860c302e54 100644 --- a/tests/Nightly/test_finetuning_data.py +++ b/intel_extension_for_transformers/neural_chat/tests/nightly/finetuning/test_finetuning_data.py @@ -1,3 +1,20 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright (c) 2023 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import os import unittest diff --git a/tests/CI/test_quantization_qa_ipex.py b/tests/CI/test_quantization_qa_ipex.py index 50aa4bc024c..fe33823d435 100644 --- a/tests/CI/test_quantization_qa_ipex.py +++ b/tests/CI/test_quantization_qa_ipex.py @@ -8,8 +8,11 @@ os.environ["CUDA_VISIBLE_DEVICES"] = "" # example test for question-answering quantization with IPEX only for now +EXAMPLE_PATH="../../examples/huggingface/pytorch/" +if not os.path.exists(EXAMPLE_PATH): + EXAMPLE_PATH="../examples/huggingface/pytorch/" SRC_DIRS = [ - os.path.join("../../examples/huggingface/pytorch/", dirname) + os.path.join(EXAMPLE_PATH, dirname) for dirname in [ "question-answering/quantization/", ]