Skip to content

Commit

Permalink
Remove perf test code from test scripts. (opea-project#1510)
Browse files Browse the repository at this point in the history
Signed-off-by: ZePan110 <[email protected]>
  • Loading branch information
ZePan110 authored Feb 18, 2025
1 parent e5c6418 commit 799881a
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 68 deletions.
3 changes: 2 additions & 1 deletion ChatQnA/tests/test_compose_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Expand Down
17 changes: 6 additions & 11 deletions ChatQnA/tests/test_compose_on_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions ChatQnA/tests/test_compose_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 4 additions & 8 deletions ChatQnA/tests/test_compose_pinecone_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions ChatQnA/tests/test_compose_tgi_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 6 additions & 10 deletions ChatQnA/tests/test_compose_tgi_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 6 additions & 10 deletions ChatQnA/tests/test_compose_without_rerank_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions GraphRAG/tests/test_compose_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 799881a

Please sign in to comment.