Skip to content

Commit cb010f7

Browse files
committed
Merge main.py with conflicts resolved
2 parents 98ddc72 + 904a062 commit cb010f7

40 files changed

+526
-224
lines changed

.github/reusable-steps/timeouted-action/action.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Sanity check (apps)
2+
3+
on:
4+
schedule:
5+
- cron: "0 2 * * *"
6+
pull_request:
7+
branches: [master]
8+
push:
9+
branches: [master]
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
find-subprojects:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
js: ${{ steps.categorize-subprojects.outputs.js }}
24+
steps:
25+
- name: Check out code
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
- name: Determine subprojects to test
30+
id: find-updates
31+
uses: ./.github/reusable-steps/find-updates
32+
with:
33+
dir: apps
34+
ci_config_file: sanity-check-apps.yml
35+
- name: Categorize subprojects
36+
id: categorize-subprojects
37+
uses: ./.github/reusable-steps/categorize-projects
38+
with:
39+
subprojects: ${{ steps.find-updates.outputs.subproject_dirs }}
40+
41+
js:
42+
needs: find-subprojects
43+
if: ${{ needs.find-subprojects.outputs.js != '[]' }}
44+
runs-on: ${{ matrix.os }}
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025]
49+
subproject: ${{ fromJson(needs.find-subprojects.outputs.js) }}
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: ./.github/reusable-steps/setup-os
53+
- name: Install Node.js
54+
uses: actions/setup-node@v4
55+
with:
56+
node-version: "22"
57+
- name: Install dependencies
58+
run: |
59+
cd ${{ matrix.subproject }}
60+
npm install
61+
- name: Run JS Project
62+
shell: bash
63+
timeout-minutes: 1
64+
run: |
65+
cd ${{ matrix.subproject }}
66+
npm start &

.github/workflows/sanity-check-demos.yml

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
outputs:
2323
gradio: ${{ steps.categorize-subprojects.outputs.gradio }}
2424
webcam: ${{ steps.categorize-subprojects.outputs.webcam }}
25-
js: ${{ steps.categorize-subprojects.outputs.js }}
2625
steps:
2726
- name: Check out code
2827
uses: actions/checkout@v4
@@ -47,7 +46,7 @@ jobs:
4746
strategy:
4847
fail-fast: false
4948
matrix:
50-
os: [ubuntu-latest, windows-latest, macos-latest]
49+
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025]
5150
python: ["3.10", "3.13"]
5251
subproject: ${{ fromJson(needs.find-subprojects.outputs.gradio) }}
5352
steps:
@@ -76,7 +75,7 @@ jobs:
7675
strategy:
7776
fail-fast: false
7877
matrix:
79-
os: [ubuntu-latest, windows-latest, macos-latest]
78+
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025]
8079
python: ["3.10", "3.13"]
8180
subproject: ${{ fromJson(needs.find-subprojects.outputs.webcam) }}
8281
steps:
@@ -86,35 +85,14 @@ jobs:
8685
with:
8786
python: ${{ matrix.python }}
8887
project: ${{ matrix.subproject }}
89-
- uses: ./.github/reusable-steps/timeouted-action
90-
name: Run Webcam Demo
91-
with:
92-
command: python main.py --stream sample_video.mp4
93-
project: ${{ matrix.subproject }}
94-
95-
js:
96-
needs: find-subprojects
97-
if: ${{ needs.find-subprojects.outputs.js != '[]' }}
98-
runs-on: ${{ matrix.os }}
99-
strategy:
100-
fail-fast: false
101-
matrix:
102-
os: [ubuntu-latest, windows-latest, macos-latest]
103-
subproject: ${{ fromJson(needs.find-subprojects.outputs.js) }}
104-
steps:
105-
- uses: actions/checkout@v4
106-
- uses: ./.github/reusable-steps/setup-os
107-
- name: Install Node.js
108-
uses: actions/setup-node@v4
109-
with:
110-
node-version: "22"
111-
- name: Install dependencies
88+
- name: Run Webcam Demo
89+
shell: bash
90+
timeout-minutes: 30
11291
run: |
11392
cd ${{ matrix.subproject }}
114-
npm install
115-
- uses: ./.github/reusable-steps/timeouted-action
116-
name: Run JS Project
117-
with:
118-
command: npm start
119-
project: ${{ matrix.subproject }}
120-
timeout: 1m
93+
# linux requires a virtual display
94+
if [ "${{ runner.os }}" == "Linux" ]; then
95+
xvfb-run python main.py --stream sample_video.mp4
96+
else
97+
python main.py --stream sample_video.mp4
98+
fi

.github/workflows/sanity-check-kits.yml

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
strategy:
4949
fail-fast: false
5050
matrix:
51-
os: [ubuntu-latest, windows-latest, macos-latest]
51+
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025]
5252
python: ["3.10", "3.13"]
5353
subproject: ${{ fromJson(needs.find-subprojects.outputs.gradio) }}
5454
steps:
@@ -78,7 +78,6 @@ jobs:
7878
with:
7979
script: ${{ env.script }}
8080
project: ${{ matrix.subproject }}
81-
timeout: 3600
8281

8382
webcam:
8483
needs: find-subprojects
@@ -87,7 +86,7 @@ jobs:
8786
strategy:
8887
fail-fast: false
8988
matrix:
90-
os: [ubuntu-latest, windows-latest, macos-latest]
89+
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025]
9190
python: ["3.10", "3.13"]
9291
subproject: ${{ fromJson(needs.find-subprojects.outputs.webcam) }}
9392
steps:
@@ -97,11 +96,17 @@ jobs:
9796
with:
9897
python: ${{ matrix.python }}
9998
project: ${{ matrix.subproject }}
100-
- uses: ./.github/reusable-steps/timeouted-action
101-
name: Run Webcam Demo
102-
with:
103-
command: python main.py --stream sample_video.mp4
104-
project: ${{ matrix.subproject }}
99+
- name: Run Webcam Demo
100+
shell: bash
101+
timeout-minutes: 30
102+
run: |
103+
cd ${{ matrix.subproject }}
104+
# linux requires a virtual display
105+
if [ "${{ runner.os }}" == "Linux" ]; then
106+
xvfb-run python main.py --stream sample_video.mp4
107+
else
108+
python main.py --stream sample_video.mp4
109+
fi
105110
106111
python:
107112
needs: find-subprojects
@@ -110,7 +115,7 @@ jobs:
110115
strategy:
111116
fail-fast: false
112117
matrix:
113-
os: [ubuntu-latest, windows-latest, macos-latest]
118+
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025]
114119
python: ["3.10", "3.13"]
115120
subproject: ${{ fromJson(needs.find-subprojects.outputs.python) }}
116121
steps:
@@ -120,11 +125,12 @@ jobs:
120125
with:
121126
python: ${{ matrix.python }}
122127
project: ${{ matrix.subproject }}
123-
- uses: ./.github/reusable-steps/timeouted-action
124-
name: Run Python
125-
with:
126-
command: python main.py
127-
project: ${{ matrix.subproject }}
128+
- name: Run Python
129+
shell: bash
130+
timeout-minutes: 10
131+
run: |
132+
cd ${{ matrix.subproject }}
133+
python main.py
128134
129135
notebook:
130136
needs: find-subprojects
@@ -133,7 +139,7 @@ jobs:
133139
strategy:
134140
fail-fast: false
135141
matrix:
136-
os: [ubuntu-latest, windows-latest, macos-latest]
142+
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025]
137143
python: ["3.10", "3.13"]
138144
subproject: ${{ fromJson(needs.find-subprojects.outputs.notebook) }}
139145
steps:
@@ -147,8 +153,9 @@ jobs:
147153
with:
148154
python: ${{ matrix.python }}
149155
project: ${{ matrix.subproject }}
150-
- uses: ./.github/reusable-steps/timeouted-action
151-
name: Run Notebook
152-
with:
153-
command: jupyter nbconvert --to notebook --execute *.ipynb
154-
project: ${{ matrix.subproject }}
156+
- name: Run Notebook
157+
shell: bash
158+
timeout-minutes: 30
159+
run: |
160+
cd ${{ matrix.subproject }}
161+
jupyter nbconvert --to notebook --debug --execute *.ipynb

.github/workflows/sanity-check-notebooks.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
fail-fast: false
4747
matrix:
4848
# onnxruntime-openvino is not available on mac
49-
os: [ubuntu-latest, windows-latest]
49+
os: [ubuntu-24.04, windows-2025]
5050
python: ["3.10", "3.13"]
5151
subproject: ${{ fromJson(needs.find-subprojects.outputs.notebook) }}
5252
steps:
@@ -66,8 +66,14 @@ jobs:
6666
cd ${{ matrix.subproject }}
6767
# replace video_path with sample_video.mp4
6868
find . -name "*.ipynb" -exec sed -E -i "s/video_path\s*=\s*(['\"]?.*?['\"]?)/video_path=\\\\\"sample_video.mp4\\\\\"\\\n\",/g" {} +
69-
- uses: ./.github/reusable-steps/timeouted-action
70-
name: Run Notebook
71-
with:
72-
command: jupyter nbconvert --to notebook --execute *.ipynb
73-
project: ${{ matrix.subproject }}
69+
- name: Run Notebook
70+
shell: bash
71+
timeout-minutes: 30
72+
run: |
73+
cd ${{ matrix.subproject }}
74+
if [ "${{ runner.os }}" == "Linux" ]; then
75+
xvfb-run jupyter nbconvert --to notebook --debug --execute *.ipynb
76+
else
77+
jupyter nbconvert --to notebook --debug --execute *.ipynb
78+
fi
79+

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Each AI Reference Kit includes:
2828
### [Interactive Demos](demos): End-to-end Examples with Simple Setup
2929
This directory contains interactive demos aimed at demonstrating how OpenVINO performs as an AI optimization and inference engine (cloud, client, and edge).
3030

31+
### [Desktop Applications](apps): User-Friendly AI Applications with OpenVINO
32+
Discover interactive desktop applications using OpenVINO as an engine for AI inference.
33+
3134
### [Notebooks](notebooks): Jupyter Notebooks with OpenVINO code
3235
Explore Jupyter notebooks that demonstrate how to use OpenVINO to build and deploy AI solutions.
3336

ai_ref_kits/agentic_llm_rag/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ onnxruntime==1.20.1
1313
torch==2.8.0
1414

1515
transformers==4.53.3
16+
datasets==4.0.0
1617
librosa==0.10.2
1718
pyyaml==6.0.1
1819
pymupdf==1.26.3

ai_ref_kits/automated_self_checkout/directrun.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def stream_object_detection(video):
275275

276276
labels = [
277277
f'#{tracker_id} {label_map[class_id]} {confidence:0.2f}'
278-
for _, _, confidence, class_id, tracker_id
278+
for _, _, confidence, class_id, tracker_id, _
279279
in detections
280280
]
281281

@@ -285,10 +285,10 @@ def stream_object_detection(video):
285285
frame = zone_annotator.annotate(scene=frame)
286286

287287
objects = [f'#{tracker_id} {label_map[class_id]}' for _,
288-
_, confidence, class_id, tracker_id in detections]
288+
_, confidence, class_id, tracker_id, _ in detections]
289289

290290
# Accumlate detections by classid
291-
for _, _, confidence, class_id, tracker_id in detections:
291+
for _, _, confidence, class_id, tracker_id, _ in detections:
292292
if label_map[class_id] in item_list:
293293
item_list[label_map[class_id]] += 1
294294
else:
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
--extra-index-url https://download.pytorch.org/whl/cpu
22

3+
jupyterlab==4.2.5
4+
35
openvino==2025.2.0
46
nncf==2.17.0
7+
58
ultralytics==8.3.38
69
onnx==1.18.0
7-
supervision==0.17.1
8-
numpy==1.26.4
9-
jupyterlab==4.2.5
10+
supervision==0.18.0
11+
12+
numpy==2.2.6
1013
pycocotools==2.0.6
14+
1115
lapx==0.5.11
1216
spaces==0.37.1
1317
gradio==5.35.0

0 commit comments

Comments
 (0)