Skip to content

Commit e102291

Browse files
authored
BUGFIX: rename videoragqna to videoqna to align with other examples (#798)
Signed-off-by: BaoHuiling <huiling.bao@intel.com> Signed-off-by: chen, suyue <suyue.chen@intel.com>
1 parent 3f2e7b7 commit e102291

File tree

12 files changed

+77
-74
lines changed

12 files changed

+77
-74
lines changed

VideoRAGQnA/Dockerfile renamed to VideoQnA/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ WORKDIR /home/user/GenAIComps
2222
RUN pip install --no-cache-dir --upgrade pip && \
2323
pip install --no-cache-dir -r /home/user/GenAIComps/requirements.txt
2424

25-
COPY ./videoragqna.py /home/user/videoragqna.py
25+
COPY ./videoqna.py /home/user/videoqna.py
2626

2727
ENV PYTHONPATH=$PYTHONPATH:/home/user/GenAIComps
2828

2929
USER user
3030

3131
WORKDIR /home/user
3232

33-
ENTRYPOINT ["python", "videoragqna.py"]
33+
ENTRYPOINT ["python", "videoqna.py"]

VideoRAGQnA/README.md renamed to VideoQnA/README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# VideoRAGQnA Application
1+
# VideoQnA Application
22

3-
Video RAG QnA is a framework that retrieves video based on provided user prompt. It uses only the video embeddings to perform vector similarity search in Intel's VDMS vector database and performs all operations on Intel Xeon CPU. The pipeline supports long form videos and time-based search.
3+
VideoQnA is a framework that retrieves video based on provided user prompt. It uses only the video embeddings to perform vector similarity search in Intel's VDMS vector database and performs all operations on Intel Xeon CPU. The pipeline supports long form videos and time-based search.
44

5-
VideoRAGQnA is implemented on top of [GenAIComps](https://github.com/opea-project/GenAIComps), with the architecture flow chart shows below:
5+
VideoQnA is implemented on top of [GenAIComps](https://github.com/opea-project/GenAIComps), with the architecture flow chart shows below:
66

77
```mermaid
88
---
@@ -21,9 +21,9 @@ flowchart LR
2121
classDef orange fill:#FBAA60,stroke:#ADD8E6,stroke-width:2px,fill-opacity:0.5
2222
classDef orchid fill:#C26DBC,stroke:#ADD8E6,stroke-width:2px,fill-opacity:0.5
2323
classDef invisible fill:transparent,stroke:transparent;
24-
style VideoRAGQnA-MegaService stroke:#000000
24+
style VideoQnA-MegaService stroke:#000000
2525
%% Subgraphs %%
26-
subgraph VideoRAGQnA-MegaService["VideoRAGQnA-MegaService"]
26+
subgraph VideoQnA-MegaService["VideoQnA-MegaService"]
2727
direction LR
2828
EM([Embedding <br>]):::blue
2929
RET([Retrieval <br>]):::blue
@@ -36,10 +36,10 @@ flowchart LR
3636
UI([UI server<br>]):::orchid
3737
Ingest([Ingest<br>]):::orchid
3838
end
39-
subgraph VideoRAGQnA GateWay
39+
subgraph VideoQnA GateWay
4040
direction LR
4141
invisible1[ ]:::invisible
42-
GW([VideoRAGQnA GateWay<br>]):::orange
42+
GW([VideoQnA GateWay<br>]):::orange
4343
end
4444
subgraph .
4545
X([OPEA Micsrservice]):::blue
@@ -66,7 +66,7 @@ flowchart LR
6666
direction LR
6767
a[User Input Query] -->|1| UI
6868
UI -->|2| GW
69-
GW <==>|3| VideoRAGQnA-MegaService
69+
GW <==>|3| VideoQnA-MegaService
7070
EM ==>|4| RET
7171
RET ==>|5| RER
7272
RER ==>|6| LLM
@@ -85,11 +85,14 @@ flowchart LR
8585
DP <-.->|d|VDB
8686
```
8787

88-
This VideoRAGQnA use case performs RAG using LangChain, Intel VDMS VectorDB and Text Generation Inference on Intel XEON Scalable Processors.
88+
- This project implements a Retrieval-Augmented Generation (RAG) workflow using LangChain, Intel VDMS VectorDB, and Text Generation Inference, optimized for Intel XEON Scalable Processors.
89+
- Video Processing: Videos are converted into feature vectors using mean aggregation and stored in the VDMS vector store.
90+
- Query Handling: When a user submits a query, the system performs a similarity search in the vector store to retrieve the best-matching videos.
91+
- Contextual Inference: The retrieved videos are then sent to the Large Vision Model (LVM) for inference, providing supplemental context for the query.
8992

90-
## Deploy VideoRAGQnA Service
93+
## Deploy VideoQnA Service
9194

92-
The VideoRAGQnA service can be effortlessly deployed on Intel XEON Scalable Processors.
95+
The VideoQnA service can be effortlessly deployed on Intel XEON Scalable Processors.
9396

9497
### Required Models
9598

@@ -100,8 +103,8 @@ By default, the embedding and LVM models are set to a default value as listed be
100103
| Embedding | openai/clip-vit-base-patch32 |
101104
| LVM | DAMO-NLP-SG/Video-LLaMA |
102105

103-
### Deploy VideoRAGQnA on Xeon
106+
### Deploy VideoQnA on Xeon
104107

105108
For full instruction of deployment, please check [Guide](docker_compose/intel/cpu/xeon/README.md)
106109

107-
Currently we support deploying VideoRAGQnA services with docker compose, using the docker images `built from source`. Find the corresponding [compose.yaml](docker_compose/intel/cpu/xeon/compose.yaml).
110+
Currently we support deploying VideoQnA services with docker compose, using the docker images `built from source`. Find the corresponding [compose.yaml](docker_compose/intel/cpu/xeon/compose.yaml).

VideoRAGQnA/docker_compose/intel/cpu/xeon/README.md renamed to VideoQnA/docker_compose/intel/cpu/xeon/README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Build Mega Service of videoragqna on Xeon
1+
# Build Mega Service of videoqna on Xeon
22

3-
This document outlines the deployment process for a videoragqna application utilizing the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline on Intel Xeon server. The steps include Docker image creation, container deployment via Docker Compose, and service execution to integrate microservices such as `embedding`, `retriever`, `rerank`, and `lvm`. We will publish the Docker images to Docker Hub soon, it will simplify the deployment process for this service.
3+
This document outlines the deployment process for a videoqna application utilizing the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline on Intel Xeon server. The steps include Docker image creation, container deployment via Docker Compose, and service execution to integrate microservices such as `embedding`, `retriever`, `rerank`, and `lvm`. We will publish the Docker images to Docker Hub soon, it will simplify the deployment process for this service.
44

5-
VideoRAGQnA is a pipeline that retrieves video based on provided user prompt. It uses only the video embeddings to perform vector similarity search in Intel's VDMS vector database and performs all operations on Intel Xeon CPU. The pipeline supports long form videos and time-based search.
5+
VideoQnA is a pipeline that retrieves video based on provided user prompt. It uses only the video embeddings to perform vector similarity search in Intel's VDMS vector database and performs all operations on Intel Xeon CPU. The pipeline supports long form videos and time-based search.
66

77
## 🚀 Port used for the microservices
88

@@ -68,7 +68,7 @@ docker build -t opea/retriever-vdms:latest --build-arg https_proxy=$https_proxy
6868
### 3. Build Rerank Image
6969

7070
```bash
71-
docker build -t opea/reranking-videoragqna:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/reranks/video-rag-qna/Dockerfile .
71+
docker build -t opea/reranking-videoqna:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/reranks/videoqna/Dockerfile .
7272
```
7373

7474
### 4. Build LVM Image (Xeon)
@@ -89,14 +89,14 @@ cd ..
8989

9090
### 6. Build MegaService Docker Image
9191

92-
To construct the Mega Service, we utilize the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline within the `videoragqna.py` Python script.
92+
To construct the Mega Service, we utilize the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline within the `videoqna.py` Python script.
9393

9494
Build MegaService Docker image via below command:
9595

9696
```bash
9797
git clone https://github.com/opea-project/GenAIExamples.git
98-
cd GenAIExamples/VideoRAGQnA/
99-
docker build -t opea/videoragqna:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
98+
cd GenAIExamples/VideoQnA/
99+
docker build -t opea/videoqna:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
100100
```
101101

102102
### 7. Build UI Docker Image
@@ -105,19 +105,19 @@ Build frontend Docker image via below command:
105105

106106
```bash
107107
cd ui
108-
docker build -t opea/videoragqna-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile .
108+
docker build -t opea/videoqna-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile .
109109
```
110110

111111
Then run the command `docker images`, you will have the following 8 Docker Images:
112112

113113
1. `opea/dataprep-multimodal-vdms:latest`
114114
2. `opea/embedding-multimodal-clip:latest`
115115
3. `opea/retriever-vdms:latest`
116-
4. `opea/reranking-videoragqna:latest`
116+
4. `opea/reranking-videoqna:latest`
117117
5. `opea/video-llama-lvm-server:latest`
118118
6. `opea/lvm-video-llama:latest`
119-
7. `opea/videoragqna:latest`
120-
8. `opea/videoragqna-ui:latest`
119+
7. `opea/videoqna:latest`
120+
8. `opea/videoqna-ui:latest`
121121

122122
## 🚀 Start Microservices
123123

@@ -168,7 +168,7 @@ export DATAPREP_GET_VIDEO_LIST_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_
168168

169169
export VDMS_HOST=${host_ip}
170170
export VDMS_PORT=8001
171-
export INDEX_NAME="mega-videoragqna"
171+
export INDEX_NAME="mega-videoqna"
172172
export LLM_DOWNLOAD="True"
173173
export USECLIP=1
174174

@@ -189,7 +189,7 @@ There are 2 parts of the pipeline:
189189
In the deploy steps, you need to start the VDMS DB and dataprep firstly, then insert some sample data into it. After that you could get the megaservice up.
190190

191191
```bash
192-
cd GenAIExamples/VideoRAGQnA/docker_compose/intel/cpu/xeon/
192+
cd GenAIExamples/VideoQnA/docker_compose/intel/cpu/xeon/
193193

194194
docker volume create video-llama-model
195195
docker compose up vdms-vector-db dataprep -d
@@ -306,7 +306,7 @@ docker compose up -d
306306
7. MegaService
307307

308308
```bash
309-
curl http://${host_ip}:8888/v1/videoragqna -H "Content-Type: application/json" -d '{
309+
curl http://${host_ip}:8888/v1/videoqna -H "Content-Type: application/json" -d '{
310310
"messages": "What is the man doing?",
311311
"stream": "True"
312312
}'
@@ -319,16 +319,16 @@ docker compose up -d
319319
To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
320320

321321
```yaml
322-
videoragqna-xeon-ui-server:
323-
image: opea/videoragqna-ui:latest
322+
videoqna-xeon-ui-server:
323+
image: opea/videoqna-ui:latest
324324
...
325325
ports:
326326
- "80:5173" # port map to host port 80
327327
```
328328
329-
Here is an example of running videoragqna:
329+
Here is an example of running videoqna:
330330
331-
![project-screenshot](../../../../assets/img/video-rag-qna.gif)
331+
![project-screenshot](../../../../assets/img/videoqna.gif)
332332
333333
## Clean Microservices
334334

VideoRAGQnA/docker_compose/intel/cpu/xeon/compose.yaml renamed to VideoQnA/docker_compose/intel/cpu/xeon/compose.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ services:
6161
volumes:
6262
- /home/$USER/.cache/huggingface/hub:/home/user/.cache/huggingface/hub
6363
reranking:
64-
image: ${REGISTRY:-opea}/reranking-videoragqna:${TAG:-latest}
65-
container_name: reranking-videoragqna-server
64+
image: ${REGISTRY:-opea}/reranking-videoqna:${TAG:-latest}
65+
container_name: reranking-videoqna-server
6666
ports:
6767
- "8000:8000"
6868
ipc: host
@@ -103,9 +103,9 @@ services:
103103
restart: unless-stopped
104104
depends_on:
105105
- lvm-video-llama
106-
videoragqna-xeon-backend-server:
107-
image: ${REGISTRY:-opea}/videoragqna:${TAG:-latest}
108-
container_name: videoragqna-xeon-backend-server
106+
videoqna-xeon-backend-server:
107+
image: ${REGISTRY:-opea}/videoqna:${TAG:-latest}
108+
container_name: videoqna-xeon-backend-server
109109
depends_on:
110110
- vdms-vector-db
111111
- dataprep
@@ -116,7 +116,7 @@ services:
116116
- lvm
117117
ports:
118118
- "8888:8888"
119-
entrypoint: sh -c 'sleep 45 && python videoragqna.py'
119+
entrypoint: sh -c 'sleep 45 && python videoqna.py'
120120
environment:
121121
http_proxy: ${http_proxy}
122122
https_proxy: ${https_proxy}
@@ -128,11 +128,11 @@ services:
128128
LVM_SERVICE_HOST_IP: ${LVM_SERVICE_HOST_IP}
129129
ipc: host
130130
restart: always
131-
videoragqna-xeon-ui-server:
132-
image: ${REGISTRY:-opea}/videoragqna-ui:${TAG:-latest}
133-
container_name: videoragqna-xeon-ui-server
131+
videoqna-xeon-ui-server:
132+
image: ${REGISTRY:-opea}/videoqna-ui:${TAG:-latest}
133+
container_name: videoqna-xeon-ui-server
134134
depends_on:
135-
- videoragqna-xeon-backend-server
135+
- videoqna-xeon-backend-server
136136
ports:
137137
- "5173:5173"
138138
environment:

VideoRAGQnA/docker_compose/intel/cpu/xeon/set_env.sh renamed to VideoQnA/docker_compose/intel/cpu/xeon/set_env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
1212
export LVM_SERVICE_HOST_IP=${host_ip}
1313

1414
export LVM_ENDPOINT="http://${host_ip}:9009"
15-
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/videoragqna"
15+
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/videoqna"
1616
export BACKEND_HEALTH_CHECK_ENDPOINT="http://${host_ip}:8888/v1/health_check"
1717
export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
1818
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
1919
export DATAPREP_GET_VIDEO_LIST_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_videos"
2020

2121
export VDMS_HOST=${host_ip}
2222
export VDMS_PORT=8001
23-
export INDEX_NAME="mega-videoragqna"
23+
export INDEX_NAME="mega-videoqna"
2424
export USECLIP=1
2525
export LLM_DOWNLOAD="True" # Set to "False" before redeploy LVM server to avoid model download

VideoRAGQnA/docker_image_build/build.yaml renamed to VideoQnA/docker_image_build/build.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,54 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
services:
5-
videoragqna:
5+
videoqna:
66
build:
77
args:
88
http_proxy: ${http_proxy}
99
https_proxy: ${https_proxy}
1010
no_proxy: ${no_proxy}
1111
context: ../
1212
dockerfile: ./Dockerfile
13-
image: ${REGISTRY:-opea}/videoragqna:${TAG:-latest}
14-
videoragqna-ui:
13+
image: ${REGISTRY:-opea}/videoqna:${TAG:-latest}
14+
videoqna-ui:
1515
build:
1616
context: ../ui
1717
dockerfile: ./docker/Dockerfile
18-
extends: videoragqna
19-
image: ${REGISTRY:-opea}/videoragqna-ui:${TAG:-latest}
18+
extends: videoqna
19+
image: ${REGISTRY:-opea}/videoqna-ui:${TAG:-latest}
2020
dataprep-multimodal-vdms:
2121
build:
2222
context: GenAIComps
2323
dockerfile: comps/dataprep/vdms/multimodal_langchain/Dockerfile
24-
extends: videoragqna
24+
extends: videoqna
2525
image: ${REGISTRY:-opea}/dataprep-multimodal-vdms:${TAG:-latest}
2626
embedding-multimodal-clip:
2727
build:
2828
context: GenAIComps
2929
dockerfile: comps/embeddings/multimodal_clip/Dockerfile
30-
extends: videoragqna
30+
extends: videoqna
3131
image: ${REGISTRY:-opea}/embedding-multimodal-clip:${TAG:-latest}
3232
retriever-vdms:
3333
build:
3434
context: GenAIComps
3535
dockerfile: comps/retrievers/vdms/langchain/Dockerfile
36-
extends: videoragqna
36+
extends: videoqna
3737
image: ${REGISTRY:-opea}/retriever-vdms:${TAG:-latest}
38-
reranking-videoragqna:
38+
reranking-videoqna:
3939
build:
4040
context: GenAIComps
41-
dockerfile: comps/reranks/video-rag-qna/Dockerfile
42-
extends: videoragqna
43-
image: ${REGISTRY:-opea}/reranking-videoragqna:${TAG:-latest}
41+
dockerfile: comps/reranks/videoqna/Dockerfile
42+
extends: videoqna
43+
image: ${REGISTRY:-opea}/reranking-videoqna:${TAG:-latest}
4444
video-llama-lvm-server:
4545
build:
4646
context: GenAIComps
4747
dockerfile: comps/lvms/video-llama/dependency/Dockerfile
48-
extends: videoragqna
48+
extends: videoqna
4949
image: ${REGISTRY:-opea}/video-llama-lvm-server:${TAG:-latest}
5050
lvm-video-llama:
5151
build:
5252
context: GenAIComps
5353
dockerfile: comps/lvms/video-llama/Dockerfile
54-
extends: videoragqna
54+
extends: videoqna
5555
image: ${REGISTRY:-opea}/lvm-video-llama:${TAG:-latest}

VideoRAGQnA/tests/test_compose_on_xeon.sh renamed to VideoQnA/tests/test_compose_on_xeon.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function start_services() {
5151
sleep 1m
5252

5353
# List of containers running uvicorn
54-
list=("dataprep-vdms-server" "embedding-multimodal-server" "retriever-vdms-server" "reranking-videoragqna-server" "video-llama-lvm-server" "lvm-video-llama" "videoragqna-xeon-backend-server")
54+
list=("dataprep-vdms-server" "embedding-multimodal-server" "retriever-vdms-server" "reranking-videoqna-server" "video-llama-lvm-server" "lvm-video-llama" "videoqna-xeon-backend-server")
5555

5656
# Define the maximum time limit in seconds
5757
TIME_LIMIT=5400
@@ -101,7 +101,7 @@ function start_services() {
101101
sleep 5m
102102
done
103103

104-
if docker logs videoragqna-xeon-ui-server 2>&1 | grep -q "Streamlit app"; then
104+
if docker logs videoqna-xeon-ui-server 2>&1 | grep -q "Streamlit app"; then
105105
return 0
106106
else
107107
return 1
@@ -176,7 +176,7 @@ function validate_microservices() {
176176
"${ip_address}:8000/v1/reranking" \
177177
"video_url" \
178178
"reranking" \
179-
"reranking-videoragqna-server" \
179+
"reranking-videoqna-server" \
180180
'{
181181
"retrieved_docs": [{"doc": [{"text": "retrieved text"}]}],
182182
"initial_query": "query",
@@ -199,10 +199,10 @@ function validate_microservices() {
199199

200200
function validate_megaservice() {
201201
validate_services \
202-
"${ip_address}:8888/v1/videoragqna" \
202+
"${ip_address}:8888/v1/videoqna" \
203203
"man" \
204-
"videoragqna-xeon-backend-server" \
205-
"videoragqna-xeon-backend-server" \
204+
"videoqna-xeon-backend-server" \
205+
"videoqna-xeon-backend-server" \
206206
'{"messages":"What is the man doing?","stream":"True"}'
207207
}
208208

@@ -216,12 +216,12 @@ function validate_frontend() {
216216
echo "Frontend Content is as expected."
217217
else
218218
echo "Frontend Content does not match the expected result: $CONTENT"
219-
docker logs videoragqna-xeon-ui-server >> ${LOG_PATH}/ui.log
219+
docker logs videoqna-xeon-ui-server >> ${LOG_PATH}/ui.log
220220
exit 1
221221
fi
222222
else
223223
echo "Frontend is not running correctly. Received status was $HTTP_STATUS"
224-
docker logs videoragqna-xeon-ui-server >> ${LOG_PATH}/ui.log
224+
docker logs videoqna-xeon-ui-server >> ${LOG_PATH}/ui.log
225225
exit 1
226226
fi
227227
}
File renamed without changes.

0 commit comments

Comments
 (0)