From 237a81ec6b916c9e467dc391e8b700b888a8dfc6 Mon Sep 17 00:00:00 2001 From: Dolpher Du Date: Tue, 15 Oct 2024 16:34:48 +0000 Subject: [PATCH] Implement the nowrapper version chatqna Change the helm chart follow this commit https://github.com/opea-project/GenAIExamples/commit/619d9410477408dcc51bc0058851e9e8f59185a2 CI changes Signed-off-by: Dolpher Du --- .github/workflows/_helm-e2e.yaml | 1 - .github/workflows/pr-chart-e2e.yaml | 13 +++-------- .pre-commit-config.yaml | 2 +- helm-charts/chatqna/Chart.yaml | 9 -------- helm-charts/chatqna/templates/deployment.yaml | 22 ++++++++++++++----- 5 files changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/workflows/_helm-e2e.yaml b/.github/workflows/_helm-e2e.yaml index 9d101e6f2..0062127b0 100644 --- a/.github/workflows/_helm-e2e.yaml +++ b/.github/workflows/_helm-e2e.yaml @@ -111,7 +111,6 @@ jobs: helm-charts/update_dependency.sh && helm dependency update ${{ env.CHART_FOLDER }} if ! helm install --create-namespace --namespace $NAMESPACE --wait \ --timeout "$ROLLOUT_TIMEOUT_SECONDS" \ - --set autodependency.enabled=true \ --set GOOGLE_API_KEY=${{ env.GOOGLE_API_KEY}} \ --set GOOGLE_CSE_ID=${{ env.GOOGLE_CSE_ID}} \ --values ${{ env.CHART_FOLDER }}/${value_file} \ diff --git a/.github/workflows/pr-chart-e2e.yaml b/.github/workflows/pr-chart-e2e.yaml index 98604d834..75e5de196 100644 --- a/.github/workflows/pr-chart-e2e.yaml +++ b/.github/workflows/pr-chart-e2e.yaml @@ -9,7 +9,6 @@ on: types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: - helm-charts/** - - .github/workflows/chart-e2e.yaml workflow_dispatch: concurrency: @@ -39,7 +38,7 @@ jobs: merged_commit=$(git log -1 --format='%H') e2e_charts=$(git diff --name-only ${base_commit} ${merged_commit} | \ grep "^$CHARTS_DIR/" | \ - grep -vE 'README.md|common|*.sh' | \ + grep -vE 'README.md|CI.md|common|*.sh' | \ cut -d'/' -f2 | sort -u ) common_charts=$(git diff --name-only ${base_commit} ${merged_commit} | \ grep "^$CHARTS_DIR/common" | \ @@ -47,11 +46,8 @@ jobs: cut -d'/' -f3 | sort -u ) run_matrix="{\"include\":[" for chart in ${e2e_charts}; do - for file in "$CHARTS_DIR/$chart"/*values.yaml; do + for file in "$CHARTS_DIR/$chart"/ci-*values.yaml; do if [ -f "$file" ]; then - if [[ "$file" == *"nv-values.yaml" ]] || [[ "$file" == *"hpa-values.yaml" ]]; then - continue - fi filename=$(basename "$file" .yaml) if [[ "$filename" == *"gaudi"* ]]; then run_matrix="${run_matrix}{\"example\":\"${chart}\",\"hardware\":\"gaudi\", \"valuefile\":\"${filename}\"}," @@ -62,11 +58,8 @@ jobs: done done for chart in ${common_charts}; do - for file in "$CHARTS_DIR/common/$chart"/*values.yaml; do + for file in "$CHARTS_DIR/common/$chart"/ci-*values.yaml; do if [ -f "$file" ]; then - if [[ "$file" == *"nv-values.yaml" ]] || [[ "$file" == *"hpa-values.yaml" ]]; then - continue - fi filename=$(basename "$file" .yaml) if [[ "$filename" == *"gaudi"* ]]; then run_matrix="${run_matrix}{\"example\":\"${chart}\",\"hardware\":\"gaudi\", \"valuefile\":\"${filename}\",\"directory\":\"common\"}," diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7cea5781..8ebc70f0e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -59,7 +59,7 @@ repos: - id: isort - repo: https://github.com/PyCQA/docformatter - rev: v1.7.5 + rev: 06907d0 hooks: - id: docformatter args: [ diff --git a/helm-charts/chatqna/Chart.yaml b/helm-charts/chatqna/Chart.yaml index 1425f84cf..7d22d2811 100644 --- a/helm-charts/chatqna/Chart.yaml +++ b/helm-charts/chatqna/Chart.yaml @@ -18,21 +18,12 @@ dependencies: - name: tgi version: 1.0.0 repository: "file://../common/tgi" - - name: llm-uservice - version: 1.0.0 - repository: "file://../common/llm-uservice" - name: tei version: 1.0.0 repository: "file://../common/tei" - - name: embedding-usvc - version: 1.0.0 - repository: "file://../common/embedding-usvc" - name: teirerank version: 1.0.0 repository: "file://../common/teirerank" - - name: reranking-usvc - version: 1.0.0 - repository: "file://../common/reranking-usvc" - name: redis-vector-db version: 1.0.0 repository: "file://../common/redis-vector-db" diff --git a/helm-charts/chatqna/templates/deployment.yaml b/helm-charts/chatqna/templates/deployment.yaml index 84b51b96d..37adf3f40 100644 --- a/helm-charts/chatqna/templates/deployment.yaml +++ b/helm-charts/chatqna/templates/deployment.yaml @@ -33,16 +33,26 @@ spec: containers: - name: {{ .Release.Name }} env: - - name: LLM_SERVICE_HOST_IP - value: {{ .Release.Name }}-llm-uservice - - name: RERANK_SERVICE_HOST_IP - value: {{ .Release.Name }}-reranking-usvc + - name: LLM_SERVER_HOST_IP + value: {{ .Release.Name }}-tgi + - name: LLM_SERVER_PORT + value: "80" + - name: RERANK_SERVER_HOST_IP + value: {{ .Release.Name }}-teirerank + - name: RERANK_SERVER_PORT + value: "80" - name: RETRIEVER_SERVICE_HOST_IP value: {{ .Release.Name }}-retriever-usvc - - name: EMBEDDING_SERVICE_HOST_IP - value: {{ .Release.Name }}-embedding-usvc + - name: EMBEDDING_SERVER_HOST_IP + value: {{ .Release.Name }}-tei + - name: EMBEDDING_SERVER_PORT + value: "80" - name: GUARDRAIL_SERVICE_HOST_IP value: {{ .Release.Name }}-guardrails-usvc + {{- if .Values.LOGFLAG }} + - name: LOGFLAG + value: {{ .Values.LOGFLAG | quote }} + {{- end }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"