Skip to content

Commit

Permalink
fix ut (#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincyZhang committed Feb 24, 2024
1 parent 8569d7b commit 9e9e4c7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ function pytest() {
if [ $(grep -c "Segmentation fault" ${ut_log_name}) != 0 ]; then
$BOLD_RED && echo "Segmentation Fault found in UT, please check the output..." && $RESET
exit 1
fi
fi
if [ $(grep -c "ImportError:" ${ut_log_name}) != 0 ]; then
$BOLD_RED && echo "ImportError found in UT, please check the output..." && $RESET
exit 1
fi
$BOLD_GREEN && echo "UT finished successfully! " && $RESET
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ function neuralspeed_test() {
[ $(grep -c "Segmentation fault" ${ut_log_name}) != 0 ] ||
[ $(grep -c "core dumped" ${ut_log_name}) != 0 ] ||
[ $(grep -c "==ERROR:" ${ut_log_name}) != 0 ] ||
[ $(grep -c "ModuleNotFoundError:" ${ut_log_name}) != 0 ]; then
[ $(grep -c "ModuleNotFoundError:" ${ut_log_name}) != 0 ] ||
[ $(grep -c "ImportError:" ${ut_log_name}) != 0 ]; then
exit 1
fi; then
$BOLD_RED && echo "Find errors in engine test, please check the output..." && $RESET
exit 1
else
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/script/unitTest/run_unit_test_optimize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ function pytest() {
$BOLD_RED && echo "Segmentation Fault found in UT, please check the output..." && $RESET
exit 1
fi

if [ $(grep -c "ImportError:" ${ut_log_name}) != 0 ]; then
$BOLD_RED && echo "ImportError found in UT, please check the output..." && $RESET
exit 1
fi
$BOLD_GREEN && echo "UT finished successfully! " && $RESET
}

Expand Down
2 changes: 1 addition & 1 deletion tests/CI/test_llava.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import os
import unittest
from intel_extension_for_transformers.transformers.modeling.llava_models import LlavaMistralForCausalLM
from intel_extension_for_transformers.transformers.modeling.llava_models.llava_mistral import LlavaMistralForCausalLM
from accelerate import init_empty_weights
from transformers import AutoConfig, AutoTokenizer
import torch
Expand Down

0 comments on commit 9e9e4c7

Please sign in to comment.