From 326a637953a4ae2882aa3d31195634b00d96b162 Mon Sep 17 00:00:00 2001 From: Steve Zhang Date: Mon, 26 Aug 2024 16:39:36 +0800 Subject: [PATCH] restructure the directory of config sample and update the e2e test. (#351) Signed-off-by: zhlsunshine --- .../workflows/scripts/e2e/gmc_gaudi_test.sh | 64 +++++++++--------- .../workflows/scripts/e2e/gmc_xeon_test.sh | 66 +++++++++---------- .../{ => AudioQnA}/audioQnA_gaudi.yaml | 0 .../samples/{ => AudioQnA}/audioQnA_xeon.yaml | 0 .../{ => ChatQnA}/chatQnA_dataprep_gaudi.yaml | 0 .../{ => ChatQnA}/chatQnA_dataprep_xeon.yaml | 0 .../samples/{ => ChatQnA}/chatQnA_gaudi.yaml | 0 .../samples/{ => ChatQnA}/chatQnA_nv.yaml | 0 .../{ => ChatQnA}/chatQnA_switch_gaudi.yaml | 0 .../{ => ChatQnA}/chatQnA_switch_nv.yaml | 0 .../{ => ChatQnA}/chatQnA_switch_xeon.yaml | 0 .../samples/{ => ChatQnA}/chatQnA_xeon.yaml | 0 .../samples/{ => CodeGen}/codegen_gaudi.yaml | 0 .../samples/{ => CodeGen}/codegen_xeon.yaml | 0 .../{ => CodeTrans}/codetrans_gaudi.yaml | 0 .../{ => CodeTrans}/codetrans_xeon.yaml | 0 .../samples/{ => DocSum}/docsum_gaudi.yaml | 0 .../samples/{ => DocSum}/docsum_xeon.yaml | 0 .../{ => SearchQnA}/searchQnA_gaudi.yaml | 0 .../{ => SearchQnA}/searchQnA_xeon.yaml | 0 .../{ => Translation}/translation_gaudi.yaml | 0 .../{ => Translation}/translation_xeon.yaml | 0 22 files changed, 65 insertions(+), 65 deletions(-) rename microservices-connector/config/samples/{ => AudioQnA}/audioQnA_gaudi.yaml (100%) rename microservices-connector/config/samples/{ => AudioQnA}/audioQnA_xeon.yaml (100%) rename microservices-connector/config/samples/{ => ChatQnA}/chatQnA_dataprep_gaudi.yaml (100%) rename microservices-connector/config/samples/{ => ChatQnA}/chatQnA_dataprep_xeon.yaml (100%) rename microservices-connector/config/samples/{ => ChatQnA}/chatQnA_gaudi.yaml (100%) rename microservices-connector/config/samples/{ => ChatQnA}/chatQnA_nv.yaml (100%) rename microservices-connector/config/samples/{ => ChatQnA}/chatQnA_switch_gaudi.yaml (100%) rename microservices-connector/config/samples/{ => ChatQnA}/chatQnA_switch_nv.yaml (100%) rename microservices-connector/config/samples/{ => ChatQnA}/chatQnA_switch_xeon.yaml (100%) rename microservices-connector/config/samples/{ => ChatQnA}/chatQnA_xeon.yaml (100%) rename microservices-connector/config/samples/{ => CodeGen}/codegen_gaudi.yaml (100%) rename microservices-connector/config/samples/{ => CodeGen}/codegen_xeon.yaml (100%) rename microservices-connector/config/samples/{ => CodeTrans}/codetrans_gaudi.yaml (100%) rename microservices-connector/config/samples/{ => CodeTrans}/codetrans_xeon.yaml (100%) rename microservices-connector/config/samples/{ => DocSum}/docsum_gaudi.yaml (100%) rename microservices-connector/config/samples/{ => DocSum}/docsum_xeon.yaml (100%) rename microservices-connector/config/samples/{ => SearchQnA}/searchQnA_gaudi.yaml (100%) rename microservices-connector/config/samples/{ => SearchQnA}/searchQnA_xeon.yaml (100%) rename microservices-connector/config/samples/{ => Translation}/translation_gaudi.yaml (100%) rename microservices-connector/config/samples/{ => Translation}/translation_xeon.yaml (100%) diff --git a/.github/workflows/scripts/e2e/gmc_gaudi_test.sh b/.github/workflows/scripts/e2e/gmc_gaudi_test.sh index 3d4be765..231baec5 100755 --- a/.github/workflows/scripts/e2e/gmc_gaudi_test.sh +++ b/.github/workflows/scripts/e2e/gmc_gaudi_test.sh @@ -55,7 +55,7 @@ function validate_gmc() { function validate_webhook() { kubectl create ns $WEBHOOK_NAMESPACE || echo "namespace $WEBHOOK_NAMESPACE is created." # validate root node existence - yq ".spec.nodes.node123 = .spec.nodes.root | del(.spec.nodes.root)" config/samples/chatQnA_xeon.yaml > /tmp/webhook-case1.yaml + yq ".spec.nodes.node123 = .spec.nodes.root | del(.spec.nodes.root)" config/samples/ChatQnA/chatQnA_xeon.yaml > /tmp/webhook-case1.yaml sed -i "s|namespace: chatqa|namespace: $WEBHOOK_NAMESPACE|g" /tmp/webhook-case1.yaml output=$(! kubectl apply -f /tmp/webhook-case1.yaml 2>&1) if ! (echo $output | grep -q "a root node is required"); then @@ -65,7 +65,7 @@ function validate_webhook() { fi # StepName validation - yq '(.spec.nodes.root.steps[] | select ( .name == "Llm")).name = "xyz"' config/samples/chatQnA_gaudi.yaml > /tmp/webhook-case2.yaml + yq '(.spec.nodes.root.steps[] | select ( .name == "Llm")).name = "xyz"' config/samples/ChatQnA/chatQnA_gaudi.yaml > /tmp/webhook-case2.yaml sed -i "s|namespace: chatqa|namespace: $WEBHOOK_NAMESPACE|g" /tmp/webhook-case2.yaml output=$(! kubectl apply -f /tmp/webhook-case2.yaml 2>&1) if ! (echo $output | grep -q "invalid step name"); then @@ -75,7 +75,7 @@ function validate_webhook() { fi # nodeName existence - yq '(.spec.nodes.root.steps[] | select ( .name == "Embedding")).nodeName = "node123"' config/samples/chatQnA_switch_xeon.yaml > /tmp/webhook-case3.yaml + yq '(.spec.nodes.root.steps[] | select ( .name == "Embedding")).nodeName = "node123"' config/samples/ChatQnA/chatQnA_switch_xeon.yaml > /tmp/webhook-case3.yaml sed -i "s|namespace: switch|namespace: $WEBHOOK_NAMESPACE|g" /tmp/webhook-case3.yaml output=$(! kubectl apply -f /tmp/webhook-case3.yaml 2>&1) if ! (echo $output | grep -q "node name: node123 in step Embedding does not exist"); then @@ -85,7 +85,7 @@ function validate_webhook() { fi # serviceName uniqueness - yq '(.spec.nodes.node1.steps[] | select ( .name == "Embedding")).internalService.serviceName = "tei-embedding-svc-bge15"' config/samples/chatQnA_switch_xeon.yaml > /tmp/webhook-case4.yaml + 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 sed -i "s|namespace: switch|namespace: $WEBHOOK_NAMESPACE|g" /tmp/webhook-case4.yaml output=$(! kubectl apply -f /tmp/webhook-case4.yaml 2>&1) if ! (echo $output | grep -q "service name: tei-embedding-svc-bge15 in node node1 already exists"); then @@ -114,8 +114,8 @@ function cleanup_apps() { function validate_audioqa() { kubectl create ns $AUDIOQA_NAMESPACE - sed -i "s|namespace: audioqa|namespace: $AUDIOQA_NAMESPACE|g" $(pwd)/config/samples/audioQnA_gaudi.yaml - kubectl apply -f $(pwd)/config/samples/audioQnA_gaudi.yaml + sed -i "s|namespace: audioqa|namespace: $AUDIOQA_NAMESPACE|g" $(pwd)/config/samples/AudioQnA/audioQnA_gaudi.yaml + kubectl apply -f $(pwd)/config/samples/AudioQnA/audioQnA_gaudi.yaml # Wait until the router service is ready echo "Waiting for the audioqa router service to be ready..." @@ -165,8 +165,8 @@ function validate_audioqa() { function validate_chatqna() { kubectl create ns $CHATQNA_NAMESPACE - sed -i "s|namespace: chatqa|namespace: $CHATQNA_NAMESPACE|g" $(pwd)/config/samples/chatQnA_gaudi.yaml - kubectl apply -f $(pwd)/config/samples/chatQnA_gaudi.yaml + sed -i "s|namespace: chatqa|namespace: $CHATQNA_NAMESPACE|g" $(pwd)/config/samples/ChatQnA/chatQnA_gaudi.yaml + kubectl apply -f $(pwd)/config/samples/ChatQnA/chatQnA_gaudi.yaml # Wait until the router service is ready echo "Waiting for the chatqa router service to be ready..." @@ -233,10 +233,10 @@ function validate_chatqna() { function validate_chatqna_with_dataprep() { kubectl create ns $CHATQNA_DATAPREP_NAMESPACE - sed -i "s|namespace: chatqa|namespace: $CHATQNA_DATAPREP_NAMESPACE|g" $(pwd)/config/samples/chatQnA_dataprep_gaudi.yaml + sed -i "s|namespace: chatqa|namespace: $CHATQNA_DATAPREP_NAMESPACE|g" $(pwd)/config/samples/ChatQnA/chatQnA_dataprep_gaudi.yaml # workaround for issue #268 - yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/chatQnA_dataprep_gaudi.yaml - kubectl apply -f $(pwd)/config/samples/chatQnA_dataprep_gaudi.yaml + yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/ChatQnA/chatQnA_dataprep_gaudi.yaml + kubectl apply -f $(pwd)/config/samples/ChatQnA/chatQnA_dataprep_gaudi.yaml # Wait until the router service is ready echo "Waiting for the chatqa router service to be ready..." @@ -326,10 +326,10 @@ function validate_chatqna_with_dataprep() { function validate_chatqna_in_switch() { kubectl create ns $CHATQNA_SWITCH_NAMESPACE - sed -i "s|namespace: switch|namespace: $CHATQNA_SWITCH_NAMESPACE|g" $(pwd)/config/samples/chatQnA_switch_gaudi.yaml + sed -i "s|namespace: switch|namespace: $CHATQNA_SWITCH_NAMESPACE|g" $(pwd)/config/samples/ChatQnA/chatQnA_switch_gaudi.yaml # workaround for issue #268 - yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/chatQnA_switch_gaudi.yaml - kubectl apply -f $(pwd)/config/samples/chatQnA_switch_gaudi.yaml + yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/ChatQnA/chatQnA_switch_gaudi.yaml + kubectl apply -f $(pwd)/config/samples/ChatQnA/chatQnA_switch_gaudi.yaml # Wait until the router service is ready echo "Waiting for the chatqa router service to be ready..." @@ -422,9 +422,9 @@ function validate_chatqna_in_switch() { function validate_modify_config() { kubectl create ns $MODIFY_STEP_NAMESPACE - cp $(pwd)/config/samples/codegen_xeon.yaml $(pwd)/config/samples/codegen_xeon_mod.yaml - sed -i "s|namespace: codegen|namespace: $MODIFY_STEP_NAMESPACE|g" $(pwd)/config/samples/codegen_xeon_mod.yaml - kubectl apply -f $(pwd)/config/samples/codegen_xeon_mod.yaml + cp $(pwd)/config/samples/CodeGen/codegen_xeon.yaml $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml + sed -i "s|namespace: codegen|namespace: $MODIFY_STEP_NAMESPACE|g" $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml # Wait until the router service is ready echo "Waiting for the router service to be ready..." @@ -447,8 +447,8 @@ function validate_modify_config() { fi #change the model id of the step named "Tgi" in the codegen_xeon_mod.yaml - yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/codegen_xeon_mod.yaml - kubectl apply -f $(pwd)/config/samples/codegen_xeon_mod.yaml + yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml #you are supposed to see an error, it's a known issue, but it does not affect the tests #https://github.com/opea-project/GenAIInfra/issues/314 @@ -460,7 +460,7 @@ function validate_modify_config() { fi #revert the codegen yaml - sed -i "s|namespace: $MODIFY_STEP_NAMESPACE|namespace: codegen|g" $(pwd)/config/samples/codegen_xeon_mod.yaml + sed -i "s|namespace: $MODIFY_STEP_NAMESPACE|namespace: codegen|g" $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml kubectl delete gmc -n $MODIFY_STEP_NAMESPACE 'codegen' echo "sleep 10s for cleaning up" sleep 10 @@ -469,9 +469,9 @@ function validate_modify_config() { function validate_remove_step() { kubectl create ns $DELETE_STEP_NAMESPACE - cp $(pwd)/config/samples/codegen_xeon.yaml $(pwd)/config/samples/codegen_xeon_del.yaml - sed -i "s|namespace: codegen|namespace: $DELETE_STEP_NAMESPACE|g" $(pwd)/config/samples/codegen_xeon_del.yaml - kubectl apply -f $(pwd)/config/samples/codegen_xeon_del.yaml + cp $(pwd)/config/samples/CodeGen/codegen_xeon.yaml $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml + sed -i "s|namespace: codegen|namespace: $DELETE_STEP_NAMESPACE|g" $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml # Wait until the router service is ready echo "Waiting for the router service to be ready..." @@ -494,8 +494,8 @@ function validate_remove_step() { fi # remove the step named "llm" in the codegen_xeon.yaml - yq -i 'del(.spec.nodes.root.steps[] | select ( .name == "Llm"))' $(pwd)/config/samples/codegen_xeon_del.yaml - kubectl apply -f $(pwd)/config/samples/codegen_xeon_del.yaml + yq -i 'del(.spec.nodes.root.steps[] | select ( .name == "Llm"))' $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml sleep 10 check_pod_terminated $DELETE_STEP_NAMESPACE @@ -507,7 +507,7 @@ function validate_remove_step() { fi #revert the codegen yaml - sed -i "s|namespace: $DELETE_STEP_NAMESPACE|namespace: codegen|g" $(pwd)/config/samples/codegen_xeon_del.yaml + sed -i "s|namespace: $DELETE_STEP_NAMESPACE|namespace: codegen|g" $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml kubectl delete gmc -n $DELETE_STEP_NAMESPACE 'codegen' echo "sleep 10s for cleaning up" sleep 10 @@ -516,8 +516,8 @@ function validate_remove_step() { function validate_codegen() { kubectl create ns $CODEGEN_NAMESPACE - sed -i "s|namespace: codegen|namespace: $CODEGEN_NAMESPACE|g" $(pwd)/config/samples/codegen_gaudi.yaml - kubectl apply -f $(pwd)/config/samples/codegen_gaudi.yaml + sed -i "s|namespace: codegen|namespace: $CODEGEN_NAMESPACE|g" $(pwd)/config/samples/CodeGen/codegen_gaudi.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_gaudi.yaml # Wait until the router service is ready echo "Waiting for the codegen router service to be ready..." @@ -566,8 +566,8 @@ function validate_codegen() { function validate_codetrans() { kubectl create ns $CODETRANS_NAMESPACE - sed -i "s|namespace: codetrans|namespace: $CODETRANS_NAMESPACE|g" $(pwd)/config/samples/codetrans_gaudi.yaml - kubectl apply -f $(pwd)/config/samples/codetrans_gaudi.yaml + sed -i "s|namespace: codetrans|namespace: $CODETRANS_NAMESPACE|g" $(pwd)/config/samples/CodeTrans/codetrans_gaudi.yaml + kubectl apply -f $(pwd)/config/samples/CodeTrans/codetrans_gaudi.yaml # Wait until the router service is ready echo "Waiting for the codetrans router service to be ready..." @@ -615,8 +615,8 @@ function validate_codetrans() { function validate_docsum() { kubectl create ns $DOCSUM_NAMESPACE - sed -i "s|namespace: docsum|namespace: $DOCSUM_NAMESPACE|g" $(pwd)/config/samples/docsum_gaudi.yaml - kubectl apply -f $(pwd)/config/samples/docsum_gaudi.yaml + sed -i "s|namespace: docsum|namespace: $DOCSUM_NAMESPACE|g" $(pwd)/config/samples/DocSum/docsum_gaudi.yaml + kubectl apply -f $(pwd)/config/samples/DocSum/docsum_gaudi.yaml # Wait until the router service is ready echo "Waiting for the docsum router service to be ready..." diff --git a/.github/workflows/scripts/e2e/gmc_xeon_test.sh b/.github/workflows/scripts/e2e/gmc_xeon_test.sh index 9f591d06..7d92fe71 100755 --- a/.github/workflows/scripts/e2e/gmc_xeon_test.sh +++ b/.github/workflows/scripts/e2e/gmc_xeon_test.sh @@ -55,7 +55,7 @@ function validate_gmc() { function validate_webhook() { kubectl create ns $WEBHOOK_NAMESPACE || echo "namespace $WEBHOOK_NAMESPACE is created." # validate root node existence - yq ".spec.nodes.node123 = .spec.nodes.root | del(.spec.nodes.root)" config/samples/chatQnA_xeon.yaml > /tmp/webhook-case1.yaml + yq ".spec.nodes.node123 = .spec.nodes.root | del(.spec.nodes.root)" config/samples/ChatQnA/chatQnA_xeon.yaml > /tmp/webhook-case1.yaml sed -i "s|namespace: chatqa|namespace: $WEBHOOK_NAMESPACE|g" /tmp/webhook-case1.yaml output=$(! kubectl apply -f /tmp/webhook-case1.yaml 2>&1) if ! (echo $output | grep -q "a root node is required"); then @@ -65,7 +65,7 @@ function validate_webhook() { fi # StepName validation - yq '(.spec.nodes.root.steps[] | select ( .name == "Llm")).name = "xyz"' config/samples/chatQnA_gaudi.yaml > /tmp/webhook-case2.yaml + yq '(.spec.nodes.root.steps[] | select ( .name == "Llm")).name = "xyz"' config/samples/ChatQnA/chatQnA_gaudi.yaml > /tmp/webhook-case2.yaml sed -i "s|namespace: chatqa|namespace: $WEBHOOK_NAMESPACE|g" /tmp/webhook-case2.yaml output=$(! kubectl apply -f /tmp/webhook-case2.yaml 2>&1) if ! (echo $output | grep -q "invalid step name"); then @@ -75,7 +75,7 @@ function validate_webhook() { fi # nodeName existence - yq '(.spec.nodes.root.steps[] | select ( .name == "Embedding")).nodeName = "node123"' config/samples/chatQnA_switch_xeon.yaml > /tmp/webhook-case3.yaml + yq '(.spec.nodes.root.steps[] | select ( .name == "Embedding")).nodeName = "node123"' config/samples/ChatQnA/chatQnA_switch_xeon.yaml > /tmp/webhook-case3.yaml sed -i "s|namespace: switch|namespace: $WEBHOOK_NAMESPACE|g" /tmp/webhook-case3.yaml output=$(! kubectl apply -f /tmp/webhook-case3.yaml 2>&1) if ! (echo $output | grep -q "node name: node123 in step Embedding does not exist"); then @@ -85,7 +85,7 @@ function validate_webhook() { fi # serviceName uniqueness - yq '(.spec.nodes.node1.steps[] | select ( .name == "Embedding")).internalService.serviceName = "tei-embedding-svc-bge15"' config/samples/chatQnA_switch_xeon.yaml > /tmp/webhook-case4.yaml + 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 sed -i "s|namespace: switch|namespace: $WEBHOOK_NAMESPACE|g" /tmp/webhook-case4.yaml output=$(! kubectl apply -f /tmp/webhook-case4.yaml 2>&1) if ! (echo $output | grep -q "service name: tei-embedding-svc-bge15 in node node1 already exists"); then @@ -114,8 +114,8 @@ function cleanup_apps() { function validate_audioqa() { kubectl create ns $AUDIOQA_NAMESPACE - sed -i "s|namespace: audioqa|namespace: $AUDIOQA_NAMESPACE|g" $(pwd)/config/samples/audioQnA_xeon.yaml - kubectl apply -f $(pwd)/config/samples/audioQnA_xeon.yaml + sed -i "s|namespace: audioqa|namespace: $AUDIOQA_NAMESPACE|g" $(pwd)/config/samples/AudioQnA/audioQnA_xeon.yaml + kubectl apply -f $(pwd)/config/samples/AudioQnA/audioQnA_xeon.yaml # Wait until the router service is ready echo "Waiting for the audioqa router service to be ready..." @@ -165,10 +165,10 @@ function validate_audioqa() { function validate_chatqna() { kubectl create ns $CHATQNA_NAMESPACE - sed -i "s|namespace: chatqa|namespace: $CHATQNA_NAMESPACE|g" $(pwd)/config/samples/chatQnA_xeon.yaml + sed -i "s|namespace: chatqa|namespace: $CHATQNA_NAMESPACE|g" $(pwd)/config/samples/ChatQnA/chatQnA_xeon.yaml # workaround for issue #268 - #yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/chatQnA_xeon.yaml - kubectl apply -f $(pwd)/config/samples/chatQnA_xeon.yaml + #yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/ChatQnA/chatQnA_xeon.yaml + kubectl apply -f $(pwd)/config/samples/ChatQnA/chatQnA_xeon.yaml # Wait until the router service is ready echo "Waiting for the chatqa router service to be ready..." @@ -235,10 +235,10 @@ function validate_chatqna() { function validate_chatqna_with_dataprep() { kubectl create ns $CHATQNA_DATAPREP_NAMESPACE - sed -i "s|namespace: chatqa|namespace: $CHATQNA_DATAPREP_NAMESPACE|g" $(pwd)/config/samples/chatQnA_dataprep_xeon.yaml + sed -i "s|namespace: chatqa|namespace: $CHATQNA_DATAPREP_NAMESPACE|g" $(pwd)/config/samples/ChatQnA/chatQnA_dataprep_xeon.yaml # workaround for issue #268 - #yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/chatQnA_dataprep_xeon.yaml - kubectl apply -f $(pwd)/config/samples/chatQnA_dataprep_xeon.yaml + #yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/ChatQnA/chatQnA_dataprep_xeon.yaml + kubectl apply -f $(pwd)/config/samples/ChatQnA/chatQnA_dataprep_xeon.yaml # Wait until the router service is ready echo "Waiting for the chatqa router service to be ready..." @@ -328,10 +328,10 @@ function validate_chatqna_with_dataprep() { function validate_chatqna_in_switch() { kubectl create ns $CHATQNA_SWITCH_NAMESPACE - sed -i "s|namespace: switch|namespace: $CHATQNA_SWITCH_NAMESPACE|g" $(pwd)/config/samples/chatQnA_switch_xeon.yaml + sed -i "s|namespace: switch|namespace: $CHATQNA_SWITCH_NAMESPACE|g" $(pwd)/config/samples/ChatQnA/chatQnA_switch_xeon.yaml # workaround for issue #268 - #yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/chatQnA_switch_xeon.yaml - kubectl apply -f $(pwd)/config/samples/chatQnA_switch_xeon.yaml + #yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "bigscience/bloom-560m"' $(pwd)/config/samples/ChatQnA/chatQnA_switch_xeon.yaml + kubectl apply -f $(pwd)/config/samples/ChatQnA/chatQnA_switch_xeon.yaml # Wait until the router service is ready echo "Waiting for the chatqa router service to be ready..." @@ -425,9 +425,9 @@ function validate_chatqna_in_switch() { function validate_modify_config() { kubectl create ns $MODIFY_STEP_NAMESPACE - cp $(pwd)/config/samples/codegen_xeon.yaml $(pwd)/config/samples/codegen_xeon_mod.yaml - sed -i "s|namespace: codegen|namespace: $MODIFY_STEP_NAMESPACE|g" $(pwd)/config/samples/codegen_xeon_mod.yaml - kubectl apply -f $(pwd)/config/samples/codegen_xeon_mod.yaml + cp $(pwd)/config/samples/CodeGen/codegen_xeon.yaml $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml + sed -i "s|namespace: codegen|namespace: $MODIFY_STEP_NAMESPACE|g" $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml # Wait until the router service is ready echo "Waiting for the router service to be ready..." @@ -450,8 +450,8 @@ function validate_modify_config() { fi #change the model id of the step named "Tgi" in the codegen_xeon_mod.yaml - yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "HuggingFaceH4/mistral-7b-grok"' $(pwd)/config/samples/codegen_xeon_mod.yaml - kubectl apply -f $(pwd)/config/samples/codegen_xeon_mod.yaml + yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "HuggingFaceH4/mistral-7b-grok"' $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml #you are supposed to see an error, it's a known issue, but it does not affect the tests #https://github.com/opea-project/GenAIInfra/issues/314 @@ -463,7 +463,7 @@ function validate_modify_config() { fi #revert the codegen yaml - sed -i "s|namespace: $MODIFY_STEP_NAMESPACE|namespace: codegen|g" $(pwd)/config/samples/codegen_xeon_mod.yaml + sed -i "s|namespace: $MODIFY_STEP_NAMESPACE|namespace: codegen|g" $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml kubectl delete gmc -n $MODIFY_STEP_NAMESPACE 'codegen' echo "sleep 10s for cleaning up" sleep 10 @@ -472,9 +472,9 @@ function validate_modify_config() { function validate_remove_step() { kubectl create ns $DELETE_STEP_NAMESPACE - cp $(pwd)/config/samples/codegen_xeon.yaml $(pwd)/config/samples/codegen_xeon_del.yaml - sed -i "s|namespace: codegen|namespace: $DELETE_STEP_NAMESPACE|g" $(pwd)/config/samples/codegen_xeon_del.yaml - kubectl apply -f $(pwd)/config/samples/codegen_xeon_del.yaml + cp $(pwd)/config/samples/CodeGen/codegen_xeon.yaml $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml + sed -i "s|namespace: codegen|namespace: $DELETE_STEP_NAMESPACE|g" $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml # Wait until the router service is ready echo "Waiting for the router service to be ready..." @@ -497,8 +497,8 @@ function validate_remove_step() { fi # remove the step named "llm" in the codegen_xeon.yaml - yq -i 'del(.spec.nodes.root.steps[] | select ( .name == "Llm"))' $(pwd)/config/samples/codegen_xeon_del.yaml - kubectl apply -f $(pwd)/config/samples/codegen_xeon_del.yaml + yq -i 'del(.spec.nodes.root.steps[] | select ( .name == "Llm"))' $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml sleep 10 check_pod_terminated $DELETE_STEP_NAMESPACE @@ -510,7 +510,7 @@ function validate_remove_step() { fi #revert the codegen yaml - sed -i "s|namespace: $DELETE_STEP_NAMESPACE|namespace: codegen|g" $(pwd)/config/samples/codegen_xeon_del.yaml + sed -i "s|namespace: $DELETE_STEP_NAMESPACE|namespace: codegen|g" $(pwd)/config/samples/CodeGen/codegen_xeon_del.yaml kubectl delete gmc -n $DELETE_STEP_NAMESPACE 'codegen' echo "sleep 10s for cleaning up" sleep 10 @@ -519,8 +519,8 @@ function validate_remove_step() { function validate_codegen() { kubectl create ns $CODEGEN_NAMESPACE - sed -i "s|namespace: codegen|namespace: $CODEGEN_NAMESPACE|g" $(pwd)/config/samples/codegen_xeon.yaml - kubectl apply -f $(pwd)/config/samples/codegen_xeon.yaml + sed -i "s|namespace: codegen|namespace: $CODEGEN_NAMESPACE|g" $(pwd)/config/samples/CodeGen/codegen_xeon.yaml + kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon.yaml # Wait until the router service is ready echo "Waiting for the codegen router service to be ready..." @@ -573,8 +573,8 @@ function validate_codegen() { function validate_codetrans() { kubectl create ns $CODETRANS_NAMESPACE - sed -i "s|namespace: codetrans|namespace: $CODETRANS_NAMESPACE|g" $(pwd)/config/samples/codetrans_xeon.yaml - kubectl apply -f $(pwd)/config/samples/codetrans_xeon.yaml + sed -i "s|namespace: codetrans|namespace: $CODETRANS_NAMESPACE|g" $(pwd)/config/samples/CodeTrans/codetrans_xeon.yaml + kubectl apply -f $(pwd)/config/samples/CodeTrans/codetrans_xeon.yaml # Wait until the router service is ready echo "Waiting for the codetrans router service to be ready..." @@ -626,8 +626,8 @@ function validate_codetrans() { function validate_docsum() { kubectl create ns $DOCSUM_NAMESPACE - sed -i "s|namespace: docsum|namespace: $DOCSUM_NAMESPACE|g" $(pwd)/config/samples/docsum_xeon.yaml - kubectl apply -f $(pwd)/config/samples/docsum_xeon.yaml + sed -i "s|namespace: docsum|namespace: $DOCSUM_NAMESPACE|g" $(pwd)/config/samples/DocSum/docsum_xeon.yaml + kubectl apply -f $(pwd)/config/samples/DocSum/docsum_xeon.yaml # Wait until the router service is ready echo "Waiting for the docsum router service to be ready..." diff --git a/microservices-connector/config/samples/audioQnA_gaudi.yaml b/microservices-connector/config/samples/AudioQnA/audioQnA_gaudi.yaml similarity index 100% rename from microservices-connector/config/samples/audioQnA_gaudi.yaml rename to microservices-connector/config/samples/AudioQnA/audioQnA_gaudi.yaml diff --git a/microservices-connector/config/samples/audioQnA_xeon.yaml b/microservices-connector/config/samples/AudioQnA/audioQnA_xeon.yaml similarity index 100% rename from microservices-connector/config/samples/audioQnA_xeon.yaml rename to microservices-connector/config/samples/AudioQnA/audioQnA_xeon.yaml diff --git a/microservices-connector/config/samples/chatQnA_dataprep_gaudi.yaml b/microservices-connector/config/samples/ChatQnA/chatQnA_dataprep_gaudi.yaml similarity index 100% rename from microservices-connector/config/samples/chatQnA_dataprep_gaudi.yaml rename to microservices-connector/config/samples/ChatQnA/chatQnA_dataprep_gaudi.yaml diff --git a/microservices-connector/config/samples/chatQnA_dataprep_xeon.yaml b/microservices-connector/config/samples/ChatQnA/chatQnA_dataprep_xeon.yaml similarity index 100% rename from microservices-connector/config/samples/chatQnA_dataprep_xeon.yaml rename to microservices-connector/config/samples/ChatQnA/chatQnA_dataprep_xeon.yaml diff --git a/microservices-connector/config/samples/chatQnA_gaudi.yaml b/microservices-connector/config/samples/ChatQnA/chatQnA_gaudi.yaml similarity index 100% rename from microservices-connector/config/samples/chatQnA_gaudi.yaml rename to microservices-connector/config/samples/ChatQnA/chatQnA_gaudi.yaml diff --git a/microservices-connector/config/samples/chatQnA_nv.yaml b/microservices-connector/config/samples/ChatQnA/chatQnA_nv.yaml similarity index 100% rename from microservices-connector/config/samples/chatQnA_nv.yaml rename to microservices-connector/config/samples/ChatQnA/chatQnA_nv.yaml diff --git a/microservices-connector/config/samples/chatQnA_switch_gaudi.yaml b/microservices-connector/config/samples/ChatQnA/chatQnA_switch_gaudi.yaml similarity index 100% rename from microservices-connector/config/samples/chatQnA_switch_gaudi.yaml rename to microservices-connector/config/samples/ChatQnA/chatQnA_switch_gaudi.yaml diff --git a/microservices-connector/config/samples/chatQnA_switch_nv.yaml b/microservices-connector/config/samples/ChatQnA/chatQnA_switch_nv.yaml similarity index 100% rename from microservices-connector/config/samples/chatQnA_switch_nv.yaml rename to microservices-connector/config/samples/ChatQnA/chatQnA_switch_nv.yaml diff --git a/microservices-connector/config/samples/chatQnA_switch_xeon.yaml b/microservices-connector/config/samples/ChatQnA/chatQnA_switch_xeon.yaml similarity index 100% rename from microservices-connector/config/samples/chatQnA_switch_xeon.yaml rename to microservices-connector/config/samples/ChatQnA/chatQnA_switch_xeon.yaml diff --git a/microservices-connector/config/samples/chatQnA_xeon.yaml b/microservices-connector/config/samples/ChatQnA/chatQnA_xeon.yaml similarity index 100% rename from microservices-connector/config/samples/chatQnA_xeon.yaml rename to microservices-connector/config/samples/ChatQnA/chatQnA_xeon.yaml diff --git a/microservices-connector/config/samples/codegen_gaudi.yaml b/microservices-connector/config/samples/CodeGen/codegen_gaudi.yaml similarity index 100% rename from microservices-connector/config/samples/codegen_gaudi.yaml rename to microservices-connector/config/samples/CodeGen/codegen_gaudi.yaml diff --git a/microservices-connector/config/samples/codegen_xeon.yaml b/microservices-connector/config/samples/CodeGen/codegen_xeon.yaml similarity index 100% rename from microservices-connector/config/samples/codegen_xeon.yaml rename to microservices-connector/config/samples/CodeGen/codegen_xeon.yaml diff --git a/microservices-connector/config/samples/codetrans_gaudi.yaml b/microservices-connector/config/samples/CodeTrans/codetrans_gaudi.yaml similarity index 100% rename from microservices-connector/config/samples/codetrans_gaudi.yaml rename to microservices-connector/config/samples/CodeTrans/codetrans_gaudi.yaml diff --git a/microservices-connector/config/samples/codetrans_xeon.yaml b/microservices-connector/config/samples/CodeTrans/codetrans_xeon.yaml similarity index 100% rename from microservices-connector/config/samples/codetrans_xeon.yaml rename to microservices-connector/config/samples/CodeTrans/codetrans_xeon.yaml diff --git a/microservices-connector/config/samples/docsum_gaudi.yaml b/microservices-connector/config/samples/DocSum/docsum_gaudi.yaml similarity index 100% rename from microservices-connector/config/samples/docsum_gaudi.yaml rename to microservices-connector/config/samples/DocSum/docsum_gaudi.yaml diff --git a/microservices-connector/config/samples/docsum_xeon.yaml b/microservices-connector/config/samples/DocSum/docsum_xeon.yaml similarity index 100% rename from microservices-connector/config/samples/docsum_xeon.yaml rename to microservices-connector/config/samples/DocSum/docsum_xeon.yaml diff --git a/microservices-connector/config/samples/searchQnA_gaudi.yaml b/microservices-connector/config/samples/SearchQnA/searchQnA_gaudi.yaml similarity index 100% rename from microservices-connector/config/samples/searchQnA_gaudi.yaml rename to microservices-connector/config/samples/SearchQnA/searchQnA_gaudi.yaml diff --git a/microservices-connector/config/samples/searchQnA_xeon.yaml b/microservices-connector/config/samples/SearchQnA/searchQnA_xeon.yaml similarity index 100% rename from microservices-connector/config/samples/searchQnA_xeon.yaml rename to microservices-connector/config/samples/SearchQnA/searchQnA_xeon.yaml diff --git a/microservices-connector/config/samples/translation_gaudi.yaml b/microservices-connector/config/samples/Translation/translation_gaudi.yaml similarity index 100% rename from microservices-connector/config/samples/translation_gaudi.yaml rename to microservices-connector/config/samples/Translation/translation_gaudi.yaml diff --git a/microservices-connector/config/samples/translation_xeon.yaml b/microservices-connector/config/samples/Translation/translation_xeon.yaml similarity index 100% rename from microservices-connector/config/samples/translation_xeon.yaml rename to microservices-connector/config/samples/Translation/translation_xeon.yaml