From eb0b1e21e7a004612f3bd41de67d080e7436ebbd Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Wed, 21 Aug 2024 03:17:14 +0000 Subject: [PATCH] Retriever: Fix missing HF_TOKEN issue of v0.9 retriever-redis image Signed-off-by: Lianhao Lu --- .github/workflows/scripts/e2e/gmc_xeon_test.sh | 8 ++++---- .../common/retriever-usvc/templates/configmap.yaml | 1 + helm-charts/common/retriever-usvc/values.yaml | 1 + .../config/manifests/retriever-usvc.yaml | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scripts/e2e/gmc_xeon_test.sh b/.github/workflows/scripts/e2e/gmc_xeon_test.sh index 703b19654..44822d538 100755 --- a/.github/workflows/scripts/e2e/gmc_xeon_test.sh +++ b/.github/workflows/scripts/e2e/gmc_xeon_test.sh @@ -167,7 +167,7 @@ function validate_chatqna() { kubectl create ns $CHATQNA_NAMESPACE sed -i "s|namespace: chatqa|namespace: $CHATQNA_NAMESPACE|g" $(pwd)/config/samples/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 + #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 # Wait until the router service is ready @@ -238,7 +238,7 @@ 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 # 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 + #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 # Wait until the router service is ready @@ -331,7 +331,7 @@ 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 # 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 + #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 # Wait until the router service is ready @@ -452,7 +452,7 @@ 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 + 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 pods_count=$(kubectl get pods -n $MODIFY_STEP_NAMESPACE -o jsonpath='{.items[*].metadata.name}' | wc -w) diff --git a/helm-charts/common/retriever-usvc/templates/configmap.yaml b/helm-charts/common/retriever-usvc/templates/configmap.yaml index 5412be2a3..8b06ab9d1 100644 --- a/helm-charts/common/retriever-usvc/templates/configmap.yaml +++ b/helm-charts/common/retriever-usvc/templates/configmap.yaml @@ -32,3 +32,4 @@ data: LANGCHAIN_API_KEY: {{ .Values.global.LANGCHAIN_API_KEY | quote }} LANGCHAIN_PROJECT: "opea-retriever-service" HF_HOME: "/tmp/.cache/huggingface" + HUGGINGFACEHUB_API_TOKEN: {{ .Values.global.HUGGINGFACEHUB_API_TOKEN | quote}} diff --git a/helm-charts/common/retriever-usvc/values.yaml b/helm-charts/common/retriever-usvc/values.yaml index 8eabeb73f..16186a061 100644 --- a/helm-charts/common/retriever-usvc/values.yaml +++ b/helm-charts/common/retriever-usvc/values.yaml @@ -92,3 +92,4 @@ global: no_proxy: "" LANGCHAIN_TRACING_V2: false LANGCHAIN_API_KEY: "insert-your-langchain-key-here" + HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" diff --git a/microservices-connector/config/manifests/retriever-usvc.yaml b/microservices-connector/config/manifests/retriever-usvc.yaml index f9d8ce16e..b329ffc9a 100644 --- a/microservices-connector/config/manifests/retriever-usvc.yaml +++ b/microservices-connector/config/manifests/retriever-usvc.yaml @@ -26,6 +26,7 @@ data: LANGCHAIN_API_KEY: "insert-your-langchain-key-here" LANGCHAIN_PROJECT: "opea-retriever-service" HF_HOME: "/tmp/.cache/huggingface" + HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" --- # Source: retriever-usvc/templates/service.yaml # Copyright (C) 2024 Intel Corporation