diff --git a/ChatQnA/tests/test_compose_on_gaudi.sh b/ChatQnA/tests/test_compose_on_gaudi.sh index 2785995bbb..59ffbb3ded 100644 --- a/ChatQnA/tests/test_compose_on_gaudi.sh +++ b/ChatQnA/tests/test_compose_on_gaudi.sh @@ -2,7 +2,7 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -set -e +set -xe IMAGE_REPO=${IMAGE_REPO:-"opea"} IMAGE_TAG=${IMAGE_TAG:-"latest"} echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}" @@ -47,6 +47,7 @@ function start_services() { export NUM_CARDS=1 export INDEX_NAME="rag-redis" export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} + export HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} export host_ip=${ip_address} export JAEGER_IP=$(ip route get 8.8.8.8 | grep -oP 'src \K[^ ]+') export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=grpc://$JAEGER_IP:4317 diff --git a/ChatQnA/tests/test_compose_on_rocm.sh b/ChatQnA/tests/test_compose_on_rocm.sh index d7b44b5666..9a25392997 100644 --- a/ChatQnA/tests/test_compose_on_rocm.sh +++ b/ChatQnA/tests/test_compose_on_rocm.sh @@ -259,17 +259,12 @@ function main() { duration=$((end_time-start_time)) echo "Mega service start duration is $duration s" && sleep 1s - - if [ "${mode}" == "perf" ]; then - python3 "$WORKPATH"/tests/chatqna_benchmark.py - elif [ "${mode}" == "" ]; then - validate_microservices - echo "==== microservices validated ====" - validate_megaservice - echo "==== megaservice validated ====" - validate_frontend - echo "==== frontend validated ====" - fi + validate_microservices + echo "==== microservices validated ====" + validate_megaservice + echo "==== megaservice validated ====" + validate_frontend + echo "==== frontend validated ====" stop_docker echo y | docker system prune diff --git a/ChatQnA/tests/test_compose_on_xeon.sh b/ChatQnA/tests/test_compose_on_xeon.sh index f914b8a615..69df81a0e8 100644 --- a/ChatQnA/tests/test_compose_on_xeon.sh +++ b/ChatQnA/tests/test_compose_on_xeon.sh @@ -193,13 +193,9 @@ function main() { duration=$((end_time-start_time)) echo "Mega service start duration is $duration s" && sleep 1s - if [ "${mode}" == "perf" ]; then - python3 $WORKPATH/tests/chatqna_benchmark.py - elif [ "${mode}" == "" ]; then - validate_microservices - validate_megaservice - # validate_frontend - fi + validate_microservices + validate_megaservice + # validate_frontend stop_docker echo y | docker system prune diff --git a/ChatQnA/tests/test_compose_pinecone_on_xeon.sh b/ChatQnA/tests/test_compose_pinecone_on_xeon.sh index 0925db6518..b45d53871c 100755 --- a/ChatQnA/tests/test_compose_pinecone_on_xeon.sh +++ b/ChatQnA/tests/test_compose_pinecone_on_xeon.sh @@ -233,14 +233,10 @@ function main() { duration=$((end_time-start_time)) echo "Mega service start duration is $duration s" && sleep 1s - if [ "${mode}" == "perf" ]; then - python3 $WORKPATH/tests/chatqna_benchmark.py - elif [ "${mode}" == "" ]; then - validate_microservices - echo "==== microservices validated ====" - validate_megaservice - echo "==== megaservice validated ====" - fi + validate_microservices + echo "==== microservices validated ====" + validate_megaservice + echo "==== megaservice validated ====" stop_docker echo y | docker system prune diff --git a/ChatQnA/tests/test_compose_tgi_on_gaudi.sh b/ChatQnA/tests/test_compose_tgi_on_gaudi.sh index 66c8a4d5c6..6b93618932 100644 --- a/ChatQnA/tests/test_compose_tgi_on_gaudi.sh +++ b/ChatQnA/tests/test_compose_tgi_on_gaudi.sh @@ -231,13 +231,9 @@ function main() { duration=$((end_time-start_time)) echo "Mega service start duration is $duration s" - if [ "${mode}" == "perf" ]; then - python3 $WORKPATH/tests/chatqna_benchmark.py - elif [ "${mode}" == "" ]; then - validate_microservices - validate_megaservice - validate_frontend - fi + validate_microservices + validate_megaservice + validate_frontend stop_docker echo y | docker system prune diff --git a/ChatQnA/tests/test_compose_tgi_on_xeon.sh b/ChatQnA/tests/test_compose_tgi_on_xeon.sh index 29d79b4229..0a9687a5ff 100644 --- a/ChatQnA/tests/test_compose_tgi_on_xeon.sh +++ b/ChatQnA/tests/test_compose_tgi_on_xeon.sh @@ -232,16 +232,12 @@ function main() { duration=$((end_time-start_time)) echo "Mega service start duration is $duration s" && sleep 1s - if [ "${mode}" == "perf" ]; then - python3 $WORKPATH/tests/chatqna_benchmark.py - elif [ "${mode}" == "" ]; then - validate_microservices - echo "==== microservices validated ====" - validate_megaservice - echo "==== megaservice validated ====" - validate_frontend - echo "==== frontend validated ====" - fi + validate_microservices + echo "==== microservices validated ====" + validate_megaservice + echo "==== megaservice validated ====" + validate_frontend + echo "==== frontend validated ====" stop_docker echo y | docker system prune diff --git a/ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh b/ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh index 5f15480ffa..5975358f29 100644 --- a/ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh +++ b/ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh @@ -218,13 +218,9 @@ function main() { duration=$((end_time-start_time)) echo "Mega service start duration is $duration s" - if [ "${mode}" == "perf" ]; then - python3 $WORKPATH/tests/chatqna_benchmark.py - elif [ "${mode}" == "" ]; then - validate_microservices - validate_megaservice - validate_frontend - fi + validate_microservices + validate_megaservice + validate_frontend stop_docker echo y | docker system prune diff --git a/ChatQnA/tests/test_compose_without_rerank_on_xeon.sh b/ChatQnA/tests/test_compose_without_rerank_on_xeon.sh index 3b3918b627..50e3feb243 100644 --- a/ChatQnA/tests/test_compose_without_rerank_on_xeon.sh +++ b/ChatQnA/tests/test_compose_without_rerank_on_xeon.sh @@ -225,16 +225,12 @@ function main() { duration=$((end_time-start_time)) echo "Mega service start duration is $duration s" && sleep 1s - if [ "${mode}" == "perf" ]; then - python3 $WORKPATH/tests/chatqna_benchmark.py - elif [ "${mode}" == "" ]; then - validate_microservices - echo "==== microservices validated ====" - validate_megaservice - echo "==== megaservice validated ====" - validate_frontend - echo "==== frontend validated ====" - fi + validate_microservices + echo "==== microservices validated ====" + validate_megaservice + echo "==== megaservice validated ====" + validate_frontend + echo "==== frontend validated ====" stop_docker echo y | docker system prune diff --git a/GraphRAG/tests/test_compose_on_gaudi.sh b/GraphRAG/tests/test_compose_on_gaudi.sh index f8bf82afe6..17f03ce61e 100755 --- a/GraphRAG/tests/test_compose_on_gaudi.sh +++ b/GraphRAG/tests/test_compose_on_gaudi.sh @@ -213,13 +213,9 @@ function main() { duration=$((end_time-start_time)) echo "Mega service start duration is $duration s" - if [ "${mode}" == "perf" ]; then - echo "not implemented" - elif [ "${mode}" == "" ]; then - validate_microservices - validate_megaservice - validate_frontend - fi + validate_microservices + validate_megaservice + validate_frontend stop_docker echo y | docker system prune