Skip to content

Commit b8ba05a

Browse files
authored
Support mutli-model test for weekly oneclick (#2204)
Signed-off-by: ZePan110 <ze.pan@intel.com>
1 parent 3e90eab commit b8ba05a

4 files changed

Lines changed: 65 additions & 40 deletions

File tree

.github/workflows/_run-one-click.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
export test_case=test_compose_faqgen_on_xeon.sh
7070
cd ${{ github.workspace }}/ChatQnA
7171
else
72-
cd ${{ github.workspace }}/${{ inputs.example }}
72+
cd ${{ github.workspace }}/$(echo "${{ inputs.example }}" | cut -d'-' -f1)
7373
fi
7474
export hardware=${{ inputs.hardware }}
7575
bash ${{ github.workspace }}/.github/workflows/scripts/docker_compose_clean_up.sh "containers"
@@ -114,24 +114,26 @@ jobs:
114114
115115
- name: Install dependencies
116116
run: |
117-
sudo apt update
118-
sudo apt install -y python3-pip
117+
# Use flock to prevent apt conflicts when multiple instances run
118+
sudo flock /var/lib/dpkg/lock-frontend apt update
119+
sudo flock /var/lib/dpkg/lock-frontend apt install -y python3-pip
119120
120121
- name: get-default-params-from-config
121122
id: get-default-params
122123
if: ${{ inputs.deploy_method == 'k8s' }}
123124
run: |
124125
cd ${{ github.workspace }}
125-
PARAMS_JSON=$(python3 .github/workflows/scripts/get-params.py ${{ inputs.example }})
126+
example=$(echo "${{ inputs.example }}" | cut -d'-' -f1)
127+
PARAMS_JSON=$(python3 .github/workflows/scripts/get-params.py $example)
126128
echo "LLM_model=$(echo "$PARAMS_JSON" | jq -r '.llm_model')" >> $GITHUB_ENV
127-
if [ "${{ inputs.example }}" = "ChatQnA" ]; then
129+
if [ "$example" = "ChatQnA" ]; then
128130
echo "LLM_model=$(echo "$PARAMS_JSON" | jq -r '.llm_model')" >> $GITHUB_ENV
129131
echo "Embedding_model=$(echo "$PARAMS_JSON" | jq -r '.embed_model')" >> $GITHUB_ENV
130132
echo "Reranking_model=$(echo "$PARAMS_JSON" | jq -r '.rerank_model')" >> $GITHUB_ENV
131133
echo "Mount_dir=$(echo "$PARAMS_JSON" | jq -r '.mount_dir')" >> $GITHUB_ENV
132-
elif [ "${{ inputs.example }}" = "VisualQnA" ]; then
134+
elif [ "$example" = "VisualQnA" ]; then
133135
echo "LVM_model=$(echo "$PARAMS_JSON" | jq -r '.lvm_model')" >> $GITHUB_ENV
134-
elif [ "${{ inputs.example }}" = "AgentQnA" ]; then
136+
elif [ "$example" = "AgentQnA" ]; then
135137
echo "LLM_model=$(echo "$PARAMS_JSON" | jq -r '.gaudi.llm_model')" >> $GITHUB_ENV
136138
fi
137139
@@ -165,7 +167,7 @@ jobs:
165167
INPUT_DATA=$(
166168
jq -r --arg type "${{ inputs.deploy_method }}" --arg id "${{ inputs.example }}" \
167169
'.[$type][$id].inputs.deploy[]' ${{ github.workspace }}/.github/workflows/one-click-inputs-nobuild.json | \
168-
sed "s|\$hardware|$hardware|g; \
170+
sed "s|\$hardware|${{ inputs.hardware }}|g; \
169171
s|\$HF_TOKEN|$HF_TOKEN|g; \
170172
s|\$LLM_model|$LLM_model|g; \
171173
s|\$Embedding_model|$Embedding_model|g; \

.github/workflows/manual-one-click-workflow.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,6 @@ name: One Click workflow on manual event
55

66
permissions:
77
contents: read
8-
# actions: read
9-
# checks: read
10-
# deployments: read
11-
# discussions: read
12-
# issues: read
13-
# packages: read
14-
# pages: read
15-
# pull-requests: read
16-
# repository-projects: read
17-
# statuses: read
18-
# security-events: read
19-
# id-token: write
20-
# attestations: read
21-
# models: read
228

239
on:
2410
workflow_dispatch:
@@ -29,8 +15,8 @@ on:
2915
required: true
3016
type: string
3117
examples:
32-
default: "ChatQnA"
33-
description: 'List of examples to test [ChatQnA,CodeTrans,DocSum,CodeGen,AudioQnA,VisualQnA,FaqGen,AgentQnA]'
18+
default: "ChatQnA,ChatQnA-Qwen"
19+
description: 'List of examples to test [ChatQnA,ChatQnA-Qwen,CodeTrans,DocSum,CodeGen,AudioQnA,VisualQnA,FaqGen,AgentQnA]'
3420
required: true
3521
type: string
3622
tag:
@@ -40,7 +26,7 @@ on:
4026
type: string
4127
deploy_methods:
4228
default: "docker,k8s"
43-
description: 'Test examples with docker compose or k8s charts'
29+
description: 'Test examples with docker compose or k8s charts(exclude AgentQnA k8s on Xeon)'
4430
type: choice
4531
required: true
4632
options:

.github/workflows/one-click-inputs-nobuild.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,30 @@
2424
"clear": ["1", "1", "2", "docker", "$hardware", "Y"]
2525
}
2626
},
27+
"ChatQnA-Qwen": {
28+
"inputs": {
29+
"deploy": [
30+
"1",
31+
"1",
32+
"1",
33+
"docker",
34+
"$hardware",
35+
"$HF_TOKEN",
36+
"$http_proxy",
37+
"$https_proxy",
38+
"$no_proxy",
39+
"Qwen/Qwen2.5-7B-Instruct",
40+
"BAAI/bge-base-en-v1.5",
41+
"BAAI/bge-reranker-base",
42+
"./data",
43+
"N",
44+
"N",
45+
"y",
46+
"Y"
47+
],
48+
"clear": ["1", "1", "2", "docker", "$hardware", "Y"]
49+
}
50+
},
2751
"CodeTrans": {
2852
"inputs": {
2953
"deploy": [
@@ -198,6 +222,30 @@
198222
"clear": ["1", "1", "2", "k8s", "y", "Y"]
199223
}
200224
},
225+
"ChatQnA-Qwen": {
226+
"inputs": {
227+
"deploy": [
228+
"1",
229+
"1",
230+
"1",
231+
"k8s",
232+
"$hardware",
233+
"$HF_TOKEN",
234+
"$http_proxy",
235+
"$https_proxy",
236+
"$no_proxy",
237+
"Qwen/Qwen2.5-7B-Instruct",
238+
"$Embedding_model",
239+
"$Reranking_model",
240+
"N",
241+
"N",
242+
"y",
243+
"8080",
244+
"Y"
245+
],
246+
"clear": ["1", "1", "2", "k8s", "y", "Y"]
247+
}
248+
},
201249
"CodeTrans": {
202250
"inputs": {
203251
"deploy": [

.github/workflows/weekly-one-click-test.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,22 @@ jobs:
3333
- name: Create Matrix
3434
id: get-matrix
3535
run: |
36-
examples=$(grep -oP '^\s{4}"\K[^"]+(?=":)' ${{ github.workspace }}/one_click_deploy/core/config.py)
36+
# Get examples from one-click-inputs-nobuild.json (both ChatQnA and ChatQnA-Qwen will be included)
37+
examples=$(jq -r '.docker | keys[]' ${{ github.workspace }}/.github/workflows/one-click-inputs-nobuild.json)
3738
examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
3839
echo "examples=$examples_json" >> $GITHUB_OUTPUT
40+
3941
nodes=($(echo ${NODES} | tr ',' ' '))
4042
nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
4143
echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
44+
4245
deploy_methods=($(echo ${DEPLOY_METHODS} | tr ',' ' '))
4346
deploy_methods_json=$(printf '%s\n' "${deploy_methods[@]}" | sort -u | jq -R '.' | jq -sc '.')
4447
echo "deploy_methods=$deploy_methods_json" >> $GITHUB_OUTPUT
4548
4649
run-examples:
4750
permissions:
4851
contents: read
49-
# id-token: write
50-
# actions: read
51-
# attestations: read
52-
# checks: write
53-
# deployments: write
54-
# discussions: read
55-
# issues: write
56-
# models: read
57-
# packages: write
58-
# pages: write
59-
# pull-requests: write
60-
# repository-projects: read
61-
# statuses: write
62-
# security-events: read
6352
needs: [get-test-matrix]
6453
strategy:
6554
matrix:

0 commit comments

Comments
 (0)