Skip to content

Commit 2e62ecc

Browse files
zhlsunshinedaisy-ycguopre-commit-ci[bot]mkbhanda
authored
add docsum example e2e test for GMC. (#347)
* add docsum example e2e test for GMC. Signed-off-by: zhlsunshine <huailong.zhang@intel.com> Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> * fix curl error for docsum. Signed-off-by: zhlsunshine <huailong.zhang@intel.com> Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> * change the manifest e2e yaml. Signed-off-by: zhlsunshine <huailong.zhang@intel.com> Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> * change the image format. Signed-off-by: zhlsunshine <huailong.zhang@intel.com> Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> * fixing image mapping error. Signed-off-by: zhlsunshine <huailong.zhang@intel.com> Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> * change the gmc e2e test. Signed-off-by: zhlsunshine <huailong.zhang@intel.com> Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> * accelarate the e2e test. Signed-off-by: zhlsunshine <huailong.zhang@intel.com> Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> * change the gmc e2e configuration. Signed-off-by: zhlsunshine <huailong.zhang@intel.com> Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> * retrigger. Signed-off-by: zhlsunshine <huailong.zhang@intel.com> Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Yingchun Guo <yingchun.guo@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Malini Bhandaru <malini.bhandaru@intel.com>
1 parent 84a91bb commit 2e62ecc

File tree

14 files changed

+564
-11
lines changed

14 files changed

+564
-11
lines changed

.github/workflows/gmc-e2e.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ jobs:
9393
if: always()
9494
run: |
9595
if $should_cleanup; then
96-
if ! kubectl delete ns $APP_NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
97-
kubectl delete pods --namespace $APP_NAMESPACE --force --grace-period=0 --all
98-
kubectl delete ns $APP_NAMESPACE --force --grace-period=0 --timeout=$KUBECTL_TIMEOUT_SECONDS
99-
fi
10096
if ! kubectl delete ns $SYSTEM_NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
10197
kubectl delete pods --namespace $SYSTEM_NAMESPACE --force --grace-period=0 --all
10298
kubectl delete ns $SYSTEM_NAMESPACE --force --grace-period=0 --timeout=$KUBECTL_TIMEOUT_SECONDS
10399
fi
100+
if ! kubectl delete ns $APP_NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
101+
kubectl delete pods --namespace $APP_NAMESPACE --force --grace-period=0 --all
102+
kubectl delete ns $APP_NAMESPACE --force --grace-period=0 --timeout=$KUBECTL_TIMEOUT_SECONDS
103+
fi
104104
fi

.github/workflows/manifest-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- name: Set variables
5959
run: |
6060
if [ ${{ matrix.hardware }} == "gaudi" ]; then IMAGE_REPO=${{ vars.IMAGE_REPO_GAUDI }}; else IMAGE_REPO=${{ vars.IMAGE_REPO_XEON }}; fi
61-
echo "IMAGE_REPO=${IMAGE_REPO}" >> $GITHUB_ENV
61+
echo "IMAGE_REPO=$OPEA_IMAGE_REPO" >> $GITHUB_ENV
6262
echo "IMAGE_TAG=${{needs.mega-image-build.outputs.image_tag}}" >> $GITHUB_ENV
6363
lower_example=$(echo "${{ matrix.example }}" | tr '[:upper:]' '[:lower:]')
6464
echo "NAMESPACE=$lower_example-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Source: llm-uservice/charts/tgi/templates/service.yaml
2+
# Copyright (C) 2024 Intel Corporation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
apiVersion: v1
6+
kind: Service
7+
metadata:
8+
name: docsum-llm-uservice
9+
labels:
10+
helm.sh/chart: llm-uservice-0.1.0
11+
app.kubernetes.io/name: llm-uservice
12+
app.kubernetes.io/instance: docsum
13+
app.kubernetes.io/version: "1.0.0"
14+
app.kubernetes.io/managed-by: Helm
15+
spec:
16+
type: ClusterIP
17+
ports:
18+
- port: 9000
19+
targetPort: 9000
20+
protocol: TCP
21+
name: llm-uservice
22+
selector:
23+
app.kubernetes.io/name: llm-uservice
24+
app.kubernetes.io/instance: docsum
25+
---
26+
# Source: llm-uservice/templates/deployment.yaml
27+
# Copyright (C) 2024 Intel Corporation
28+
# SPDX-License-Identifier: Apache-2.0
29+
30+
apiVersion: apps/v1
31+
kind: Deployment
32+
metadata:
33+
name: docsum-llm-uservice
34+
labels:
35+
helm.sh/chart: llm-uservice-0.1.0
36+
app.kubernetes.io/name: llm-uservice
37+
app.kubernetes.io/instance: docsum
38+
app.kubernetes.io/version: "1.0.0"
39+
app.kubernetes.io/managed-by: Helm
40+
spec:
41+
replicas: 1
42+
selector:
43+
matchLabels:
44+
app.kubernetes.io/name: llm-uservice
45+
app.kubernetes.io/instance: docsum
46+
template:
47+
metadata:
48+
labels:
49+
app.kubernetes.io/name: llm-uservice
50+
app.kubernetes.io/instance: docsum
51+
spec:
52+
securityContext: {}
53+
containers:
54+
- name: docsum
55+
envFrom:
56+
- configMapRef:
57+
name: qna-config
58+
env:
59+
- name: HUGGING_FACE_HUB_TOKEN
60+
value: $(HUGGINGFACEHUB_API_TOKEN)
61+
- name: HF_TOKEN
62+
value: $(HUGGINGFACEHUB_API_TOKEN)
63+
- name: LANGCHAIN_TRACING_V2
64+
value: "false"
65+
- name: LANGCHAIN_PROJECT
66+
value: "opea-llm-service"
67+
securityContext: {}
68+
image: "opea/llm-docsum-tgi:latest"
69+
imagePullPolicy: IfNotPresent
70+
ports:
71+
- name: llm-uservice
72+
containerPort: 9000
73+
protocol: TCP
74+
resources: {}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Source: llm-uservice/charts/tgi/templates/service.yaml
2+
# Copyright (C) 2024 Intel Corporation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
apiVersion: v1
6+
kind: Service
7+
metadata:
8+
name: docsum-llm-uservice
9+
labels:
10+
helm.sh/chart: llm-uservice-0.1.0
11+
app.kubernetes.io/name: llm-uservice
12+
app.kubernetes.io/instance: docsum
13+
app.kubernetes.io/version: "1.0.0"
14+
app.kubernetes.io/managed-by: Helm
15+
spec:
16+
type: ClusterIP
17+
ports:
18+
- port: 9000
19+
targetPort: 9000
20+
protocol: TCP
21+
name: llm-uservice
22+
selector:
23+
app.kubernetes.io/name: llm-uservice
24+
app.kubernetes.io/instance: docsum
25+
---
26+
# Source: llm-uservice/templates/deployment.yaml
27+
# Copyright (C) 2024 Intel Corporation
28+
# SPDX-License-Identifier: Apache-2.0
29+
30+
apiVersion: apps/v1
31+
kind: Deployment
32+
metadata:
33+
name: docsum-llm-uservice
34+
labels:
35+
helm.sh/chart: llm-uservice-0.1.0
36+
app.kubernetes.io/name: llm-uservice
37+
app.kubernetes.io/instance: docsum
38+
app.kubernetes.io/version: "1.0.0"
39+
app.kubernetes.io/managed-by: Helm
40+
spec:
41+
replicas: 1
42+
selector:
43+
matchLabels:
44+
app.kubernetes.io/name: llm-uservice
45+
app.kubernetes.io/instance: docsum
46+
template:
47+
metadata:
48+
labels:
49+
app.kubernetes.io/name: llm-uservice
50+
app.kubernetes.io/instance: docsum
51+
spec:
52+
securityContext: {}
53+
containers:
54+
- name: docsum
55+
envFrom:
56+
- configMapRef:
57+
name: qna-config
58+
env:
59+
- name: HUGGING_FACE_HUB_TOKEN
60+
value: $(HUGGINGFACEHUB_API_TOKEN)
61+
- name: HF_TOKEN
62+
value: $(HUGGINGFACEHUB_API_TOKEN)
63+
- name: LANGCHAIN_TRACING_V2
64+
value: "false"
65+
- name: LANGCHAIN_PROJECT
66+
value: "opea-llm-service"
67+
securityContext: {}
68+
image: "opea/llm-docsum-tgi:latest"
69+
imagePullPolicy: IfNotPresent
70+
ports:
71+
- name: llm-uservice
72+
containerPort: 9000
73+
protocol: TCP
74+
resources: {}

ChatQnA/tests/test_gmc_on_gaudi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function init_chatqna() {
2222
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
2323
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
2424
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: ${IMAGE_REPO}opea\"/#g" {} \;
25+
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
2626
# set huggingface token
2727
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
2828
# replace namespace "default" with real namespace

ChatQnA/tests/test_gmc_on_xeon.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function init_chatqna() {
2222
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
2323
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
2424
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: ${IMAGE_REPO}opea\"/#g" {} \;
25+
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
2626
# set huggingface token
2727
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
2828
# replace namespace "default" with real namespace

CodeGen/tests/test_gmc_on_gaudi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function init_codegen() {
2222
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
2323
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
2424
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: ${IMAGE_REPO}opea\"/#g" {} \;
25+
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
2626
# set huggingface token
2727
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
2828
# replace namespace "default" with real namespace

CodeGen/tests/test_gmc_on_xeon.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function init_codegen() {
2222
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
2323
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
2424
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: ${IMAGE_REPO}opea\"/#g" {} \;
25+
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
2626
# set huggingface token
2727
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
2828
# replace namespace "default" with real namespace

CodeTrans/tests/test_gmc_on_gaudi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function init_codetrans() {
2222
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
2323
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
2424
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: ${IMAGE_REPO}opea\"/#g" {} \;
25+
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
2626
# set huggingface token
2727
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
2828
# replace namespace "default" with real namespace

CodeTrans/tests/test_gmc_on_xeon.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function init_codetrans() {
2222
find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/models#path: $MOUNT_DIR#g" {} \;
2323
# replace the repository "image: opea/*" with "image: ${IMAGE_REPO}opea/"
2424
find . -name '*.yaml' -type f -exec sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" {} \;
25-
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: ${IMAGE_REPO}opea\"/#g" {} \;
25+
find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
2626
# set huggingface token
2727
find . -name '*.yaml' -type f -exec sed -i "s#\${HUGGINGFACEHUB_API_TOKEN}#$(cat /home/$USER_ID/.cache/huggingface/token)#g" {} \;
2828
# replace namespace "default" with real namespace

0 commit comments

Comments
 (0)