@@ -55,7 +55,7 @@ function validate_gmc() {
55
55
function validate_webhook() {
56
56
kubectl create ns $WEBHOOK_NAMESPACE || echo " namespace $WEBHOOK_NAMESPACE is created."
57
57
# validate root node existence
58
- yq " .spec.nodes.node123 = .spec.nodes.root | del(.spec.nodes.root)" config/samples/chatQnA_xeon.yaml > /tmp/webhook-case1.yaml
58
+ yq " .spec.nodes.node123 = .spec.nodes.root | del(.spec.nodes.root)" config/samples/ChatQnA/ chatQnA_xeon.yaml > /tmp/webhook-case1.yaml
59
59
sed -i " s|namespace: chatqa|namespace: $WEBHOOK_NAMESPACE |g" /tmp/webhook-case1.yaml
60
60
output=$( ! kubectl apply -f /tmp/webhook-case1.yaml 2>&1 )
61
61
if ! (echo $output | grep -q " a root node is required" ); then
@@ -65,7 +65,7 @@ function validate_webhook() {
65
65
fi
66
66
67
67
# StepName validation
68
- yq ' (.spec.nodes.root.steps[] | select ( .name == "Llm")).name = "xyz"' config/samples/chatQnA_gaudi.yaml > /tmp/webhook-case2.yaml
68
+ yq ' (.spec.nodes.root.steps[] | select ( .name == "Llm")).name = "xyz"' config/samples/ChatQnA/ chatQnA_gaudi.yaml > /tmp/webhook-case2.yaml
69
69
sed -i " s|namespace: chatqa|namespace: $WEBHOOK_NAMESPACE |g" /tmp/webhook-case2.yaml
70
70
output=$( ! kubectl apply -f /tmp/webhook-case2.yaml 2>&1 )
71
71
if ! (echo $output | grep -q " invalid step name" ); then
@@ -75,7 +75,7 @@ function validate_webhook() {
75
75
fi
76
76
77
77
# nodeName existence
78
- yq ' (.spec.nodes.root.steps[] | select ( .name == "Embedding")).nodeName = "node123"' config/samples/chatQnA_switch_xeon.yaml > /tmp/webhook-case3.yaml
78
+ yq ' (.spec.nodes.root.steps[] | select ( .name == "Embedding")).nodeName = "node123"' config/samples/ChatQnA/ chatQnA_switch_xeon.yaml > /tmp/webhook-case3.yaml
79
79
sed -i " s|namespace: switch|namespace: $WEBHOOK_NAMESPACE |g" /tmp/webhook-case3.yaml
80
80
output=$( ! kubectl apply -f /tmp/webhook-case3.yaml 2>&1 )
81
81
if ! (echo $output | grep -q " node name: node123 in step Embedding does not exist" ); then
@@ -85,7 +85,7 @@ function validate_webhook() {
85
85
fi
86
86
87
87
# serviceName uniqueness
88
- yq ' (.spec.nodes.node1.steps[] | select ( .name == "Embedding")).internalService.serviceName = "tei-embedding-svc-bge15"' config/samples/chatQnA_switch_xeon.yaml > /tmp/webhook-case4.yaml
88
+ yq ' (.spec.nodes.node1.steps[] | select ( .name == "Embedding")).internalService.serviceName = "tei-embedding-svc-bge15"' config/samples/ChatQnA/ chatQnA_switch_xeon.yaml > /tmp/webhook-case4.yaml
89
89
sed -i " s|namespace: switch|namespace: $WEBHOOK_NAMESPACE |g" /tmp/webhook-case4.yaml
90
90
output=$( ! kubectl apply -f /tmp/webhook-case4.yaml 2>&1 )
91
91
if ! (echo $output | grep -q " service name: tei-embedding-svc-bge15 in node node1 already exists" ); then
@@ -114,8 +114,8 @@ function cleanup_apps() {
114
114
115
115
function validate_audioqa() {
116
116
kubectl create ns $AUDIOQA_NAMESPACE
117
- sed -i " s|namespace: audioqa|namespace: $AUDIOQA_NAMESPACE |g" $( pwd) /config/samples/audioQnA_gaudi.yaml
118
- kubectl apply -f $( pwd) /config/samples/audioQnA_gaudi.yaml
117
+ sed -i " s|namespace: audioqa|namespace: $AUDIOQA_NAMESPACE |g" $( pwd) /config/samples/AudioQnA/ audioQnA_gaudi.yaml
118
+ kubectl apply -f $( pwd) /config/samples/AudioQnA/ audioQnA_gaudi.yaml
119
119
120
120
# Wait until the router service is ready
121
121
echo " Waiting for the audioqa router service to be ready..."
@@ -165,8 +165,8 @@ function validate_audioqa() {
165
165
166
166
function validate_chatqna() {
167
167
kubectl create ns $CHATQNA_NAMESPACE
168
- sed -i " s|namespace: chatqa|namespace: $CHATQNA_NAMESPACE |g" $( pwd) /config/samples/chatQnA_gaudi.yaml
169
- kubectl apply -f $( pwd) /config/samples/chatQnA_gaudi.yaml
168
+ sed -i " s|namespace: chatqa|namespace: $CHATQNA_NAMESPACE |g" $( pwd) /config/samples/ChatQnA/ chatQnA_gaudi.yaml
169
+ kubectl apply -f $( pwd) /config/samples/ChatQnA/ chatQnA_gaudi.yaml
170
170
171
171
# Wait until the router service is ready
172
172
echo " Waiting for the chatqa router service to be ready..."
@@ -233,10 +233,10 @@ function validate_chatqna() {
233
233
234
234
function validate_chatqna_with_dataprep() {
235
235
kubectl create ns $CHATQNA_DATAPREP_NAMESPACE
236
- sed -i " s|namespace: chatqa|namespace: $CHATQNA_DATAPREP_NAMESPACE |g" $( pwd) /config/samples/chatQnA_dataprep_gaudi.yaml
236
+ sed -i " s|namespace: chatqa|namespace: $CHATQNA_DATAPREP_NAMESPACE |g" $( pwd) /config/samples/ChatQnA/ chatQnA_dataprep_gaudi.yaml
237
237
# workaround for issue #268
238
- yq -i ' (.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $( pwd) /config/samples/chatQnA_dataprep_gaudi.yaml
239
- kubectl apply -f $( pwd) /config/samples/chatQnA_dataprep_gaudi.yaml
238
+ yq -i ' (.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $( pwd) /config/samples/ChatQnA/ chatQnA_dataprep_gaudi.yaml
239
+ kubectl apply -f $( pwd) /config/samples/ChatQnA/ chatQnA_dataprep_gaudi.yaml
240
240
241
241
# Wait until the router service is ready
242
242
echo " Waiting for the chatqa router service to be ready..."
@@ -326,10 +326,10 @@ function validate_chatqna_with_dataprep() {
326
326
327
327
function validate_chatqna_in_switch() {
328
328
kubectl create ns $CHATQNA_SWITCH_NAMESPACE
329
- sed -i " s|namespace: switch|namespace: $CHATQNA_SWITCH_NAMESPACE |g" $( pwd) /config/samples/chatQnA_switch_gaudi.yaml
329
+ sed -i " s|namespace: switch|namespace: $CHATQNA_SWITCH_NAMESPACE |g" $( pwd) /config/samples/ChatQnA/ chatQnA_switch_gaudi.yaml
330
330
# workaround for issue #268
331
- yq -i ' (.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $( pwd) /config/samples/chatQnA_switch_gaudi.yaml
332
- kubectl apply -f $( pwd) /config/samples/chatQnA_switch_gaudi.yaml
331
+ yq -i ' (.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $( pwd) /config/samples/ChatQnA/ chatQnA_switch_gaudi.yaml
332
+ kubectl apply -f $( pwd) /config/samples/ChatQnA/ chatQnA_switch_gaudi.yaml
333
333
334
334
# Wait until the router service is ready
335
335
echo " Waiting for the chatqa router service to be ready..."
@@ -422,9 +422,9 @@ function validate_chatqna_in_switch() {
422
422
423
423
function validate_modify_config() {
424
424
kubectl create ns $MODIFY_STEP_NAMESPACE
425
- cp $( pwd) /config/samples/codegen_xeon.yaml $( pwd) /config/samples/codegen_xeon_mod.yaml
426
- sed -i " s|namespace: codegen|namespace: $MODIFY_STEP_NAMESPACE |g" $( pwd) /config/samples/codegen_xeon_mod.yaml
427
- kubectl apply -f $( pwd) /config/samples/codegen_xeon_mod.yaml
425
+ cp $( pwd) /config/samples/CodeGen/ codegen_xeon.yaml $( pwd) /config/samples/CodeGen /codegen_xeon_mod.yaml
426
+ sed -i " s|namespace: codegen|namespace: $MODIFY_STEP_NAMESPACE |g" $( pwd) /config/samples/CodeGen/ codegen_xeon_mod.yaml
427
+ kubectl apply -f $( pwd) /config/samples/CodeGen/ codegen_xeon_mod.yaml
428
428
429
429
# Wait until the router service is ready
430
430
echo " Waiting for the router service to be ready..."
@@ -447,8 +447,8 @@ function validate_modify_config() {
447
447
fi
448
448
449
449
# change the model id of the step named "Tgi" in the codegen_xeon_mod.yaml
450
- yq -i ' (.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $( pwd) /config/samples/codegen_xeon_mod.yaml
451
- kubectl apply -f $( pwd) /config/samples/codegen_xeon_mod.yaml
450
+ yq -i ' (.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $( pwd) /config/samples/CodeGen/ codegen_xeon_mod.yaml
451
+ kubectl apply -f $( pwd) /config/samples/CodeGen/ codegen_xeon_mod.yaml
452
452
# you are supposed to see an error, it's a known issue, but it does not affect the tests
453
453
# https://github.com/opea-project/GenAIInfra/issues/314
454
454
@@ -460,7 +460,7 @@ function validate_modify_config() {
460
460
fi
461
461
462
462
# revert the codegen yaml
463
- sed -i " s|namespace: $MODIFY_STEP_NAMESPACE |namespace: codegen|g" $( pwd) /config/samples/codegen_xeon_mod.yaml
463
+ sed -i " s|namespace: $MODIFY_STEP_NAMESPACE |namespace: codegen|g" $( pwd) /config/samples/CodeGen/ codegen_xeon_mod.yaml
464
464
kubectl delete gmc -n $MODIFY_STEP_NAMESPACE ' codegen'
465
465
echo " sleep 10s for cleaning up"
466
466
sleep 10
@@ -469,9 +469,9 @@ function validate_modify_config() {
469
469
470
470
function validate_remove_step() {
471
471
kubectl create ns $DELETE_STEP_NAMESPACE
472
- cp $( pwd) /config/samples/codegen_xeon.yaml $( pwd) /config/samples/codegen_xeon_del.yaml
473
- sed -i " s|namespace: codegen|namespace: $DELETE_STEP_NAMESPACE |g" $( pwd) /config/samples/codegen_xeon_del.yaml
474
- kubectl apply -f $( pwd) /config/samples/codegen_xeon_del.yaml
472
+ cp $( pwd) /config/samples/CodeGen/ codegen_xeon.yaml $( pwd) /config/samples/CodeGen /codegen_xeon_del.yaml
473
+ sed -i " s|namespace: codegen|namespace: $DELETE_STEP_NAMESPACE |g" $( pwd) /config/samples/CodeGen/ codegen_xeon_del.yaml
474
+ kubectl apply -f $( pwd) /config/samples/CodeGen/ codegen_xeon_del.yaml
475
475
476
476
# Wait until the router service is ready
477
477
echo " Waiting for the router service to be ready..."
@@ -494,8 +494,8 @@ function validate_remove_step() {
494
494
fi
495
495
496
496
# remove the step named "llm" in the codegen_xeon.yaml
497
- yq -i ' del(.spec.nodes.root.steps[] | select ( .name == "Llm"))' $( pwd) /config/samples/codegen_xeon_del.yaml
498
- kubectl apply -f $( pwd) /config/samples/codegen_xeon_del.yaml
497
+ yq -i ' del(.spec.nodes.root.steps[] | select ( .name == "Llm"))' $( pwd) /config/samples/CodeGen/ codegen_xeon_del.yaml
498
+ kubectl apply -f $( pwd) /config/samples/CodeGen/ codegen_xeon_del.yaml
499
499
500
500
sleep 10
501
501
check_pod_terminated $DELETE_STEP_NAMESPACE
@@ -507,7 +507,7 @@ function validate_remove_step() {
507
507
fi
508
508
509
509
# revert the codegen yaml
510
- sed -i " s|namespace: $DELETE_STEP_NAMESPACE |namespace: codegen|g" $( pwd) /config/samples/codegen_xeon_del.yaml
510
+ sed -i " s|namespace: $DELETE_STEP_NAMESPACE |namespace: codegen|g" $( pwd) /config/samples/CodeGen/ codegen_xeon_del.yaml
511
511
kubectl delete gmc -n $DELETE_STEP_NAMESPACE ' codegen'
512
512
echo " sleep 10s for cleaning up"
513
513
sleep 10
@@ -516,8 +516,8 @@ function validate_remove_step() {
516
516
517
517
function validate_codegen() {
518
518
kubectl create ns $CODEGEN_NAMESPACE
519
- sed -i " s|namespace: codegen|namespace: $CODEGEN_NAMESPACE |g" $( pwd) /config/samples/codegen_gaudi.yaml
520
- kubectl apply -f $( pwd) /config/samples/codegen_gaudi.yaml
519
+ sed -i " s|namespace: codegen|namespace: $CODEGEN_NAMESPACE |g" $( pwd) /config/samples/CodeGen/ codegen_gaudi.yaml
520
+ kubectl apply -f $( pwd) /config/samples/CodeGen/ codegen_gaudi.yaml
521
521
522
522
# Wait until the router service is ready
523
523
echo " Waiting for the codegen router service to be ready..."
@@ -566,8 +566,8 @@ function validate_codegen() {
566
566
567
567
function validate_codetrans() {
568
568
kubectl create ns $CODETRANS_NAMESPACE
569
- sed -i " s|namespace: codetrans|namespace: $CODETRANS_NAMESPACE |g" $( pwd) /config/samples/codetrans_gaudi.yaml
570
- kubectl apply -f $( pwd) /config/samples/codetrans_gaudi.yaml
569
+ sed -i " s|namespace: codetrans|namespace: $CODETRANS_NAMESPACE |g" $( pwd) /config/samples/CodeTrans/ codetrans_gaudi.yaml
570
+ kubectl apply -f $( pwd) /config/samples/CodeTrans/ codetrans_gaudi.yaml
571
571
572
572
# Wait until the router service is ready
573
573
echo " Waiting for the codetrans router service to be ready..."
@@ -615,8 +615,8 @@ function validate_codetrans() {
615
615
616
616
function validate_docsum() {
617
617
kubectl create ns $DOCSUM_NAMESPACE
618
- sed -i " s|namespace: docsum|namespace: $DOCSUM_NAMESPACE |g" $( pwd) /config/samples/docsum_gaudi.yaml
619
- kubectl apply -f $( pwd) /config/samples/docsum_gaudi.yaml
618
+ sed -i " s|namespace: docsum|namespace: $DOCSUM_NAMESPACE |g" $( pwd) /config/samples/DocSum/ docsum_gaudi.yaml
619
+ kubectl apply -f $( pwd) /config/samples/DocSum/ docsum_gaudi.yaml
620
620
621
621
# Wait until the router service is ready
622
622
echo " Waiting for the docsum router service to be ready..."
0 commit comments