Skip to content

Commit 799881a

Browse files
authored
Remove perf test code from test scripts. (#1510)
Signed-off-by: ZePan110 <ze.pan@intel.com>
1 parent e5c6418 commit 799881a

9 files changed

+36
-68
lines changed

ChatQnA/tests/test_compose_on_gaudi.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (C) 2024 Intel Corporation
33
# SPDX-License-Identifier: Apache-2.0
44

5-
set -e
5+
set -xe
66
IMAGE_REPO=${IMAGE_REPO:-"opea"}
77
IMAGE_TAG=${IMAGE_TAG:-"latest"}
88
echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
@@ -47,6 +47,7 @@ function start_services() {
4747
export NUM_CARDS=1
4848
export INDEX_NAME="rag-redis"
4949
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
50+
export HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
5051
export host_ip=${ip_address}
5152
export JAEGER_IP=$(ip route get 8.8.8.8 | grep -oP 'src \K[^ ]+')
5253
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=grpc://$JAEGER_IP:4317

ChatQnA/tests/test_compose_on_rocm.sh

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,12 @@ function main() {
259259
duration=$((end_time-start_time))
260260
echo "Mega service start duration is $duration s" && sleep 1s
261261

262-
263-
if [ "${mode}" == "perf" ]; then
264-
python3 "$WORKPATH"/tests/chatqna_benchmark.py
265-
elif [ "${mode}" == "" ]; then
266-
validate_microservices
267-
echo "==== microservices validated ===="
268-
validate_megaservice
269-
echo "==== megaservice validated ===="
270-
validate_frontend
271-
echo "==== frontend validated ===="
272-
fi
262+
validate_microservices
263+
echo "==== microservices validated ===="
264+
validate_megaservice
265+
echo "==== megaservice validated ===="
266+
validate_frontend
267+
echo "==== frontend validated ===="
273268

274269
stop_docker
275270
echo y | docker system prune

ChatQnA/tests/test_compose_on_xeon.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,9 @@ function main() {
193193
duration=$((end_time-start_time))
194194
echo "Mega service start duration is $duration s" && sleep 1s
195195

196-
if [ "${mode}" == "perf" ]; then
197-
python3 $WORKPATH/tests/chatqna_benchmark.py
198-
elif [ "${mode}" == "" ]; then
199-
validate_microservices
200-
validate_megaservice
201-
# validate_frontend
202-
fi
196+
validate_microservices
197+
validate_megaservice
198+
# validate_frontend
203199

204200
stop_docker
205201
echo y | docker system prune

ChatQnA/tests/test_compose_pinecone_on_xeon.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,10 @@ function main() {
233233
duration=$((end_time-start_time))
234234
echo "Mega service start duration is $duration s" && sleep 1s
235235

236-
if [ "${mode}" == "perf" ]; then
237-
python3 $WORKPATH/tests/chatqna_benchmark.py
238-
elif [ "${mode}" == "" ]; then
239-
validate_microservices
240-
echo "==== microservices validated ===="
241-
validate_megaservice
242-
echo "==== megaservice validated ===="
243-
fi
236+
validate_microservices
237+
echo "==== microservices validated ===="
238+
validate_megaservice
239+
echo "==== megaservice validated ===="
244240

245241
stop_docker
246242
echo y | docker system prune

ChatQnA/tests/test_compose_tgi_on_gaudi.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,9 @@ function main() {
231231
duration=$((end_time-start_time))
232232
echo "Mega service start duration is $duration s"
233233

234-
if [ "${mode}" == "perf" ]; then
235-
python3 $WORKPATH/tests/chatqna_benchmark.py
236-
elif [ "${mode}" == "" ]; then
237-
validate_microservices
238-
validate_megaservice
239-
validate_frontend
240-
fi
234+
validate_microservices
235+
validate_megaservice
236+
validate_frontend
241237

242238
stop_docker
243239
echo y | docker system prune

ChatQnA/tests/test_compose_tgi_on_xeon.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,12 @@ function main() {
232232
duration=$((end_time-start_time))
233233
echo "Mega service start duration is $duration s" && sleep 1s
234234

235-
if [ "${mode}" == "perf" ]; then
236-
python3 $WORKPATH/tests/chatqna_benchmark.py
237-
elif [ "${mode}" == "" ]; then
238-
validate_microservices
239-
echo "==== microservices validated ===="
240-
validate_megaservice
241-
echo "==== megaservice validated ===="
242-
validate_frontend
243-
echo "==== frontend validated ===="
244-
fi
235+
validate_microservices
236+
echo "==== microservices validated ===="
237+
validate_megaservice
238+
echo "==== megaservice validated ===="
239+
validate_frontend
240+
echo "==== frontend validated ===="
245241

246242
stop_docker
247243
echo y | docker system prune

ChatQnA/tests/test_compose_without_rerank_on_gaudi.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,9 @@ function main() {
218218
duration=$((end_time-start_time))
219219
echo "Mega service start duration is $duration s"
220220

221-
if [ "${mode}" == "perf" ]; then
222-
python3 $WORKPATH/tests/chatqna_benchmark.py
223-
elif [ "${mode}" == "" ]; then
224-
validate_microservices
225-
validate_megaservice
226-
validate_frontend
227-
fi
221+
validate_microservices
222+
validate_megaservice
223+
validate_frontend
228224

229225
stop_docker
230226
echo y | docker system prune

ChatQnA/tests/test_compose_without_rerank_on_xeon.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,12 @@ function main() {
225225
duration=$((end_time-start_time))
226226
echo "Mega service start duration is $duration s" && sleep 1s
227227

228-
if [ "${mode}" == "perf" ]; then
229-
python3 $WORKPATH/tests/chatqna_benchmark.py
230-
elif [ "${mode}" == "" ]; then
231-
validate_microservices
232-
echo "==== microservices validated ===="
233-
validate_megaservice
234-
echo "==== megaservice validated ===="
235-
validate_frontend
236-
echo "==== frontend validated ===="
237-
fi
228+
validate_microservices
229+
echo "==== microservices validated ===="
230+
validate_megaservice
231+
echo "==== megaservice validated ===="
232+
validate_frontend
233+
echo "==== frontend validated ===="
238234

239235
stop_docker
240236
echo y | docker system prune

GraphRAG/tests/test_compose_on_gaudi.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,9 @@ function main() {
213213
duration=$((end_time-start_time))
214214
echo "Mega service start duration is $duration s"
215215

216-
if [ "${mode}" == "perf" ]; then
217-
echo "not implemented"
218-
elif [ "${mode}" == "" ]; then
219-
validate_microservices
220-
validate_megaservice
221-
validate_frontend
222-
fi
216+
validate_microservices
217+
validate_megaservice
218+
validate_frontend
223219

224220
stop_docker
225221
echo y | docker system prune

0 commit comments

Comments
 (0)