Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audioqna trigger ut #1328

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5d302d7
Update code and README for GenAIComps refactor (#1281)
lvliang-intel Dec 24, 2024
1a80dcf
for test only based on refactor_comps branch
chensuyue Dec 24, 2024
bac73f4
for test only
chensuyue Dec 25, 2024
744f7c9
fix ChatQnA
XinyaoWa Dec 25, 2024
3146d5d
Fix Translation and VideoQnA CI issues (#1293)
letonghan Dec 26, 2024
fe90ca1
Merge branch 'main' into genaicomps_refactor
chensuyue Dec 26, 2024
be4e9ad
Fix VisualQnA CI issues caused by Comps refactor (#1292)
letonghan Dec 26, 2024
fb51d9f
AudioQnA fix (#1290)
XinyaoWa Dec 26, 2024
40be38f
AudioQnA GPU (#1297)
XinyaoWa Dec 26, 2024
6c05365
AvatarChatbot - refactor UT (#1294)
XinyaoWa Dec 26, 2024
9ab6631
AvatarChatbot gaudi refactor ut (#1300)
XinyaoWa Dec 26, 2024
575c974
chatqna rocm ut trigger (#1302)
XinyaoWa Dec 26, 2024
885173a
for test only
chensuyue Dec 27, 2024
9efbc91
Update dockerfile for GraphRAG (#1318)
lvliang-intel Dec 29, 2024
73b3f50
Update CodeGen for GenAIComps Refactor (#1308)
lvliang-intel Dec 29, 2024
e046807
for test only, need to revert before merge
chensuyue Dec 29, 2024
3411a09
Fix SearchQnA and ProductivitySuite CI Issues (#1295)
letonghan Dec 30, 2024
b813ea4
Revert "for test only, need to revert before merge"
chensuyue Dec 31, 2024
56a7227
Fix CodeTrans.
ZePan110 Dec 31, 2024
a1f026f
Fix MultimodalQnA
ZePan110 Dec 31, 2024
ae444b1
Fix AvatarChatbot
ZePan110 Dec 31, 2024
0962d3a
Fix Dockerfile path errors
ZePan110 Dec 31, 2024
849c11d
Merge branch 'main' into genaicomps_refactor
chensuyue Jan 1, 2025
d694b0d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 1, 2025
f57ba21
Dockerfile path fix error and keep unify (#1327)
chensuyue Jan 1, 2025
1b061f5
Update DocIndexRetriever for GenAIComps refactor (#1317)
lvliang-intel Jan 2, 2025
51f6a12
Update CodeTrans for GenAIComps Refactor (#1309)
lvliang-intel Jan 2, 2025
e4d0d23
audioqna trigger ut
XinyaoWa Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/_run-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ jobs:
SERVING_TOKEN: ${{ secrets.SERVING_TOKEN }}
IMAGE_REPO: ${{ inputs.registry }}
IMAGE_TAG: ${{ inputs.tag }}
opea_branch: "refactor_comps"
example: ${{ inputs.example }}
hardware: ${{ inputs.hardware }}
test_case: ${{ matrix.test_case }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-check-duplicated-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Check Duplicated Images

on:
pull_request:
branches: [main]
branches: [main, genaicomps_refactor]
types: [opened, reopened, ready_for_review, synchronize]
paths:
- "**/docker_image_build/*.yaml"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-docker-compose-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
name: E2E test with docker compose

on:
pull_request_target:
branches: ["main", "*rc"]
pull_request:
branches: ["main", "*rc", "genaicomps_refactor"]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- "**/Dockerfile**"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Compose file and dockerfile path checking

on:
pull_request:
branches: [main]
branches: [main, genaicomps_refactor]
types: [opened, reopened, ready_for_review, synchronize]

jobs:
Expand All @@ -22,6 +22,7 @@ jobs:
run: |
cd ..
git clone https://github.com/opea-project/GenAIComps.git
cd GenAIComps && git checkout refactor_comps

- name: Check for Missing Dockerfile Paths in GenAIComps
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-link-path-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Check hyperlinks and relative path validity

on:
pull_request:
branches: [main]
branches: [main, genaicomps_refactor]
types: [opened, reopened, ready_for_review, synchronize]

jobs:
Expand Down
9 changes: 9 additions & 0 deletions AudioQnA/audioqna.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ def align_inputs(self, inputs, cur_node, runtime_graph, llm_parameters_dict, **k
return inputs


def align_inputs(self, inputs, cur_node, runtime_graph, llm_parameters_dict, **kwargs):
if self.services[cur_node].service_type == ServiceType.TTS:
new_inputs = {}
new_inputs["text"] = inputs["choices"][0]["text"]
return new_inputs
else:
return inputs


class AudioQnAService:
def __init__(self, host="0.0.0.0", port=8000):
self.host = host
Expand Down
6 changes: 6 additions & 0 deletions AudioQnA/docker_compose/amd/gpu/rocm/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ services:
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
HF_HUB_DISABLE_PROGRESS_BARS: 1
HF_HUB_ENABLE_HF_TRANSFER: 0
host_ip: ${host_ip}
healthcheck:
test: ["CMD-SHELL", "curl -f http://$host_ip:3006/health || exit 1"]
interval: 10s
timeout: 10s
retries: 100
command: --model-id ${LLM_MODEL_ID}
cap_add:
- SYS_PTRACE
Expand Down
6 changes: 6 additions & 0 deletions AudioQnA/docker_compose/intel/cpu/xeon/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ services:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
host_ip: ${host_ip}
healthcheck:
test: ["CMD-SHELL", "curl -f http://$host_ip:3006/health || exit 1"]
interval: 10s
timeout: 10s
retries: 100
command: --model-id ${LLM_MODEL_ID} --cuda-graphs 0
audioqna-xeon-backend-server:
image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
Expand Down
5 changes: 5 additions & 0 deletions AudioQnA/docker_compose/intel/hpu/gaudi/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ services:
cap_add:
- SYS_NICE
ipc: host
healthcheck:
test: ["CMD-SHELL", "sleep 500 && exit 0"]
interval: 1s
timeout: 505s
retries: 1
command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
audioqna-gaudi-backend-server:
image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
Expand Down
2 changes: 1 addition & 1 deletion AudioQnA/docker_image_build/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
llm-tgi:
build:
context: GenAIComps
dockerfile: comps/llms/text-generation/tgi/Dockerfile
dockerfile: comps/llms/src/text-generation/Dockerfile
extends: audioqna
image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
speecht5-gaudi:
Expand Down
22 changes: 2 additions & 20 deletions AudioQnA/tests/test_compose_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

set -e
set -xe
IMAGE_REPO=${IMAGE_REPO:-"opea"}
IMAGE_TAG=${IMAGE_TAG:-"latest"}
echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
Expand Down Expand Up @@ -45,25 +45,7 @@ function start_services() {

# Start Docker Containers
docker compose up -d > ${LOG_PATH}/start_services_with_compose.log
n=0
until [[ "$n" -ge 200 ]]; do
docker logs tgi-gaudi-server > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done

n=0
until [[ "$n" -ge 100 ]]; do
docker logs whisper-service > $LOG_PATH/whisper_service_start.log
if grep -q "Uvicorn server setup on port" $LOG_PATH/whisper_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done
sleep 20s
}


Expand Down
12 changes: 2 additions & 10 deletions AudioQnA/tests/test_compose_on_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2024 Advanced Micro Devices, Inc.
# SPDX-License-Identifier: Apache-2.0

set -ex
set -xe
IMAGE_REPO=${IMAGE_REPO:-"opea"}
IMAGE_TAG=${IMAGE_TAG:-"latest"}
echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
Expand Down Expand Up @@ -47,15 +47,7 @@ function start_services() {

# Start Docker Containers
docker compose up -d > ${LOG_PATH}/start_services_with_compose.log
n=0
until [[ "$n" -ge 200 ]]; do
docker logs tgi-service > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done
sleep 24s
}
function validate_megaservice() {
response=$(http_proxy="" curl http://${ip_address}:3008/v1/audioqna -XPOST -d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "max_tokens":64}' -H 'Content-Type: application/json')
Expand Down
12 changes: 2 additions & 10 deletions AudioQnA/tests/test_compose_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

set -e
set -xe
IMAGE_REPO=${IMAGE_REPO:-"opea"}
IMAGE_TAG=${IMAGE_TAG:-"latest"}
echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
Expand Down Expand Up @@ -46,15 +46,7 @@ function start_services() {

# Start Docker Containers
docker compose up -d > ${LOG_PATH}/start_services_with_compose.log
n=0
until [[ "$n" -ge 200 ]]; do
docker logs tgi-service > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done
sleep 20s
}


Expand Down
6 changes: 6 additions & 0 deletions AvatarChatbot/docker_compose/intel/cpu/xeon/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ services:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
host_ip: ${host_ip}
healthcheck:
test: ["CMD-SHELL", "curl -f http://$host_ip:3006/health || exit 1"]
interval: 10s
timeout: 10s
retries: 100
command: --model-id ${LLM_MODEL_ID} --cuda-graphs 0
wav2lip-service:
image: ${REGISTRY:-opea}/wav2lip:${TAG:-latest}
Expand Down
4 changes: 4 additions & 0 deletions AvatarChatbot/docker_compose/intel/hpu/gaudi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ docker build -t opea/whisper-gaudi:latest --build-arg https_proxy=$https_proxy -

### 3. Build LLM Image

```bash
docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/src/text-generation/Dockerfile .
```

Intel Xeon optimized image hosted in huggingface repo will be used for TGI service: ghcr.io/huggingface/tgi-gaudi:2.0.6 (https://github.com/huggingface/tgi-gaudi)

### 4. Build TTS Image
Expand Down
7 changes: 6 additions & 1 deletion AvatarChatbot/docker_compose/intel/hpu/gaudi/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ services:
cap_add:
- SYS_NICE
ipc: host
command: --model-id ${LLM_MODEL_ID} --max-input-length 128 --max-total-tokens 256
healthcheck:
test: ["CMD-SHELL", "sleep 500 && exit 0"]
interval: 1s
timeout: 505s
retries: 1
command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
wav2lip-service:
image: ${REGISTRY:-opea}/wav2lip-gaudi:${TAG:-latest}
container_name: wav2lip-service
Expand Down
2 changes: 1 addition & 1 deletion AvatarChatbot/docker_image_build/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
llm-tgi:
build:
context: GenAIComps
dockerfile: comps/llms/text-generation/tgi/Dockerfile
dockerfile: comps/llms/src/text-generation/Dockerfile
extends: avatarchatbot
image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
speecht5-gaudi:
Expand Down
14 changes: 2 additions & 12 deletions AvatarChatbot/tests/test_compose_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,9 @@ function start_services() {

# Start Docker Containers
docker compose up -d > ${LOG_PATH}/start_services_with_compose.log

n=0
until [[ "$n" -ge 200 ]]; do
docker logs tgi-gaudi-server > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done

sleep 60s
echo "All services are up and running"
sleep 5s

}


Expand Down
11 changes: 1 addition & 10 deletions AvatarChatbot/tests/test_compose_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,8 @@ function start_services() {

# Start Docker Containers
docker compose up -d
n=0
until [[ "$n" -ge 100 ]]; do
docker logs tgi-service > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done
sleep 20s
echo "All services are up and running"
sleep 5s
}


Expand Down
2 changes: 1 addition & 1 deletion ChatQnA/docker_compose/amd/gpu/rocm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ cd ../../../..

```bash
cd GenAIComps
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/nginx/Dockerfile .
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/3rd_parties/nginx/src/Dockerfile .
```

Then run the command `docker images`, you will have the following 5 Docker Images:
Expand Down
2 changes: 1 addition & 1 deletion ChatQnA/docker_compose/intel/cpu/aipc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ docker build --no-cache -t opea/chatqna-ui:latest --build-arg https_proxy=$https

```bash
cd GenAIComps
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/nginx/Dockerfile .
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/3rd_parties/nginx/src/Dockerfile .
```

Then run the command `docker images`, you will have the following 6 Docker Images:
Expand Down
2 changes: 1 addition & 1 deletion ChatQnA/docker_compose/intel/cpu/xeon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https

```bash
cd GenAIComps
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/nginx/Dockerfile .
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/3rd_parties/nginx/src/Dockerfile .
```

Then run the command `docker images`, you will have the following 5 Docker Images:
Expand Down
2 changes: 1 addition & 1 deletion ChatQnA/docker_compose/intel/cpu/xeon/README_pinecone.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https

```bash
cd GenAIComps
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/nginx/Dockerfile .
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/3rd_parties/nginx/src/Dockerfile .
```

Then run the command `docker images`, you will have the following 5 Docker Images:
Expand Down
2 changes: 1 addition & 1 deletion ChatQnA/docker_compose/intel/cpu/xeon/README_qdrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ cd ../../../..

```bash
cd GenAIComps
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/nginx/Dockerfile .
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/3rd_parties/nginx/src/Dockerfile .
```

Then run the command `docker images`, you will have the following 5 Docker Images:
Expand Down
2 changes: 1 addition & 1 deletion ChatQnA/docker_compose/intel/hpu/gaudi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https

```bash
cd GenAIComps
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/nginx/Dockerfile .
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/3rd_parties/nginx/src/Dockerfile .
```

Then run the command `docker images`, you will have the following 5 Docker Images:
Expand Down
2 changes: 1 addition & 1 deletion ChatQnA/docker_compose/nvidia/gpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ cd ../../..

```bash
cd GenAIComps
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/nginx/Dockerfile .
docker build -t opea/nginx:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/3rd_parties/nginx/src/Dockerfile .
```

Then run the command `docker images`, you will have the following 5 Docker Images:
Expand Down
Loading
Loading