Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 9e9e4c7

Browse files
authored
fix ut (#1307)
1 parent 8569d7b commit 9e9e4c7

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

.github/workflows/script/unitTest/run_unit_test_neuralchat.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ function pytest() {
7171
if [ $(grep -c "Segmentation fault" ${ut_log_name}) != 0 ]; then
7272
$BOLD_RED && echo "Segmentation Fault found in UT, please check the output..." && $RESET
7373
exit 1
74-
fi
74+
fi
75+
if [ $(grep -c "ImportError:" ${ut_log_name}) != 0 ]; then
76+
$BOLD_RED && echo "ImportError found in UT, please check the output..." && $RESET
77+
exit 1
78+
fi
7579
$BOLD_GREEN && echo "UT finished successfully! " && $RESET
7680
}
7781

.github/workflows/script/unitTest/run_unit_test_neuralspeed.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ function neuralspeed_test() {
2222
[ $(grep -c "Segmentation fault" ${ut_log_name}) != 0 ] ||
2323
[ $(grep -c "core dumped" ${ut_log_name}) != 0 ] ||
2424
[ $(grep -c "==ERROR:" ${ut_log_name}) != 0 ] ||
25-
[ $(grep -c "ModuleNotFoundError:" ${ut_log_name}) != 0 ]; then
25+
[ $(grep -c "ModuleNotFoundError:" ${ut_log_name}) != 0 ] ||
26+
[ $(grep -c "ImportError:" ${ut_log_name}) != 0 ]; then
27+
exit 1
28+
fi; then
2629
$BOLD_RED && echo "Find errors in engine test, please check the output..." && $RESET
2730
exit 1
2831
else

.github/workflows/script/unitTest/run_unit_test_optimize.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ function pytest() {
6767
$BOLD_RED && echo "Segmentation Fault found in UT, please check the output..." && $RESET
6868
exit 1
6969
fi
70-
70+
if [ $(grep -c "ImportError:" ${ut_log_name}) != 0 ]; then
71+
$BOLD_RED && echo "ImportError found in UT, please check the output..." && $RESET
72+
exit 1
73+
fi
7174
$BOLD_GREEN && echo "UT finished successfully! " && $RESET
7275
}
7376

tests/CI/test_llava.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import os
1616
import unittest
17-
from intel_extension_for_transformers.transformers.modeling.llava_models import LlavaMistralForCausalLM
17+
from intel_extension_for_transformers.transformers.modeling.llava_models.llava_mistral import LlavaMistralForCausalLM
1818
from accelerate import init_empty_weights
1919
from transformers import AutoConfig, AutoTokenizer
2020
import torch

0 commit comments

Comments
 (0)