Skip to content

Commit f91e256

Browse files
committed
Merge branch 'main' into feature/pooja/added_tests
2 parents 31bc613 + 2d99d71 commit f91e256

File tree

43 files changed

+352
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+352
-158
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ README.md @xwu2intel
1414
# Education-AI Suite
1515
# ============================================================================
1616

17-
/education-ai-suite/ @avinash-palleti @unarayan @qianlongding @yunowo @BaoHuiling @xiaojingrich
18-
/education-ai-suite/README.md @avinash-palleti @unarayan @qianlongding @yunowo @BaoHuiling @xiaojingrich @open-edge-platform/open-edge-platform-docs-write
17+
/education-ai-suite/ @avinash-palleti @unarayan @qianlongding @yunowo @BaoHuiling @xiaojingrich @yangjianfeng1208
18+
/education-ai-suite/README.md @avinash-palleti @unarayan @qianlongding @yunowo @BaoHuiling @xiaojingrich @yangjianfeng1208 @open-edge-platform/open-edge-platform-docs-write
1919

20-
/education-ai-suite/smart-classroom/docs/ @avinash-palleti @unarayan @qianlongding @yunowo @BaoHuiling @xiaojingrich @open-edge-platform/open-edge-platform-docs-write
21-
/education-ai-suite/smart-classroom/README.md @avinash-palleti @unarayan @qianlongding @yunowo @BaoHuiling @xiaojingrich @open-edge-platform/open-edge-platform-docs-write
20+
/education-ai-suite/smart-classroom/docs/ @avinash-palleti @unarayan @qianlongding @yunowo @BaoHuiling @xiaojingrich @yangjianfeng1208 @open-edge-platform/open-edge-platform-docs-write
21+
/education-ai-suite/smart-classroom/README.md @avinash-palleti @unarayan @qianlongding @yunowo @BaoHuiling @xiaojingrich @yangjianfeng1208 @open-edge-platform/open-edge-platform-docs-write
2222

2323
# ============================================================================
2424
# Health And Life Sciences AI Suite

.github/workflows/[HLS]-Multi-Modal-Patient-Monitoring.yaml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
persist-credentials: false
3030
- name: Run Trivy Filesystem Scan
31-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
31+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
3232
id: trivy-fs
3333
with:
3434
scan_type: "fs"
@@ -39,7 +39,7 @@ jobs:
3939
report_suffix: "-CT7"
4040

4141
- name: Run Trivy Filesystem Scan (SPDX)
42-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
42+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
4343
id: trivy-fs-spdx
4444
with:
4545
scan_type: "fs"
@@ -49,6 +49,11 @@ jobs:
4949
scan_target: "health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/"
5050
report_suffix: "-CT7-spdx"
5151

52+
- name: Update submodule
53+
run: |
54+
cd health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/
55+
git submodule update --init services/mdpnp/mdpnp
56+
5257
- name: Build Docker image - 3d-pose-estimation
5358
run: |
5459
cd health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/services/3d-pose-estimation/
@@ -95,7 +100,7 @@ jobs:
95100
docker build -t multi-modal-ui:latest -f Dockerfile .
96101
97102
- name: Run trivy Scan - 3d-pose-estimation
98-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
103+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
99104
id: trivy-3d-pose-estimation
100105
with:
101106
scan_type: "image"
@@ -106,7 +111,7 @@ jobs:
106111
report_suffix: "-CT248-3d-pose-estimation"
107112

108113
- name: Run trivy Scan (SPDX) - 3d-pose-estimation
109-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
114+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
110115
id: trivy-3d-pose-estimation-spdx
111116
with:
112117
scan_type: "image"
@@ -117,7 +122,7 @@ jobs:
117122
report_suffix: "-CT248-3d-pose-estimation-spdx"
118123

119124
- name: Run trivy Scan - ai-ecg-backend
120-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
125+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
121126
id: trivy-ai-ecg-backend
122127
with:
123128
scan_type: "image"
@@ -128,7 +133,7 @@ jobs:
128133
report_suffix: "-CT248-ai-ecg-backend"
129134

130135
- name: Run trivy Scan (SPDX) - ai-ecg-backend
131-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
136+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
132137
id: trivy-ai-ecg-backend-spdx
133138
with:
134139
scan_type: "image"
@@ -139,7 +144,7 @@ jobs:
139144
report_suffix: "-CT248-ai-ecg-backend-spdx"
140145

141146
- name: Run trivy Scan - dds-bridge
142-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
147+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
143148
id: trivy-dds-bridge
144149
with:
145150
scan_type: "image"
@@ -150,7 +155,7 @@ jobs:
150155
report_suffix: "-CT248-dds-bridge"
151156

152157
- name: Run trivy Scan (SPDX) - dds-bridge
153-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
158+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
154159
id: trivy-dds-bridge-spdx
155160
with:
156161
scan_type: "image"
@@ -161,7 +166,7 @@ jobs:
161166
report_suffix: "-CT248-dds-bridge-spdx"
162167

163168
- name: Run trivy Scan - mdpnp
164-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
169+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
165170
id: trivy-mdpnp
166171
with:
167172
scan_type: "image"
@@ -172,7 +177,7 @@ jobs:
172177
report_suffix: "-CT248-mdpnp"
173178

174179
- name: Run trivy Scan (SPDX) - mdpnp
175-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
180+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
176181
id: trivy-mdpnp-spdx
177182
with:
178183
scan_type: "image"
@@ -183,7 +188,7 @@ jobs:
183188
report_suffix: "-CT248-mdpnp-spdx"
184189

185190
- name: Run trivy Scan - metrics-collector
186-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
191+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
187192
id: trivy-metrics-collector
188193
with:
189194
scan_type: "image"
@@ -194,7 +199,7 @@ jobs:
194199
report_suffix: "-CT248-metrics-collector"
195200

196201
- name: Run trivy Scan (SPDX) - metrics-collector
197-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
202+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
198203
id: trivy-metrics-collector-spdx
199204
with:
200205
scan_type: "image"
@@ -205,7 +210,7 @@ jobs:
205210
report_suffix: "-CT248-metrics-collector-spdx"
206211

207212
- name: Run trivy Scan - patient-monitoring-aggregator
208-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
213+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
209214
id: trivy-patient-monitoring-aggregator
210215
with:
211216
scan_type: "image"
@@ -216,7 +221,7 @@ jobs:
216221
report_suffix: "-CT248-patient-monitoring-aggregator"
217222

218223
- name: Run trivy Scan (SPDX) - patient-monitoring-aggregator
219-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
224+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
220225
id: trivy-patient-monitoring-aggregator-spdx
221226
with:
222227
scan_type: "image"
@@ -227,7 +232,7 @@ jobs:
227232
report_suffix: "-CT248-patient-monitoring-aggregator-spdx"
228233

229234
- name: Run trivy Scan - patient-monitoring-assets
230-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
235+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
231236
id: trivy-patient-monitoring-assets
232237
with:
233238
scan_type: "image"
@@ -238,7 +243,7 @@ jobs:
238243
report_suffix: "-CT248-patient-monitoring-assets"
239244

240245
- name: Run trivy Scan (SPDX) - patient-monitoring-assets
241-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
246+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
242247
id: trivy-patient-monitoring-assets-spdx
243248
with:
244249
scan_type: "image"
@@ -249,7 +254,7 @@ jobs:
249254
report_suffix: "-CT248-patient-monitoring-assets-spdx"
250255

251256
- name: Run trivy Scan - rppg
252-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
257+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
253258
id: trivy-rppg
254259
with:
255260
scan_type: "image"
@@ -260,7 +265,7 @@ jobs:
260265
report_suffix: "-CT248-rppg"
261266

262267
- name: Run trivy Scan (SPDX) - rppg
263-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
268+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
264269
id: trivy-rppg-spdx
265270
with:
266271
scan_type: "image"
@@ -271,7 +276,7 @@ jobs:
271276
report_suffix: "-CT248-rppg-spdx"
272277

273278
- name: Run trivy Scan - ui
274-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
279+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
275280
id: trivy-ui
276281
with:
277282
scan_type: "image"
@@ -282,7 +287,7 @@ jobs:
282287
report_suffix: "-CT248-ui"
283288

284289
- name: Run trivy Scan (SPDX) - ui
285-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
290+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
286291
id: trivy-ui-spdx
287292
with:
288293
scan_type: "image"
@@ -293,7 +298,7 @@ jobs:
293298
report_suffix: "-CT248-ui-spdx"
294299

295300
- name: Scan Dockerfiles with Trivy
296-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
301+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
297302
with:
298303
scan_type: "config"
299304
scan_target: "health-and-life-sciences-ai-suite/multi_modal_patient_monitoring/services"

.github/workflows/education-suite-scan.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
persist-credentials: false
3131

3232
- name: Run Trivy Filesystem Scan
33-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
33+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
3434
id: trivy-fs
3535
with:
3636
scan_type: "fs"
@@ -41,7 +41,7 @@ jobs:
4141
report_suffix: "-fs-education-ai-suite-trivy"
4242

4343
- name: Run trivy Scan - education-suite (SPDX SBOM)
44-
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@27276444a9bcf247a27369406686b689933bd1ff
44+
uses: open-edge-platform/orch-ci/.github/actions/security/trivy@a416220a0f87725196093a638e0186286ac4a953
4545
id: videosummary-frontend-spdx
4646
with:
4747
scan_type: "fs"

.github/workflows/industrial-edge-insights-time-series-scans.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ on:
2828
- virus-scan
2929
- dbs-scan
3030
- codeql-scan
31+
- pylint-scan
3132

3233
application:
3334
description: 'Which application to scan (time-series, multimodal or both)'
@@ -944,4 +945,44 @@ jobs:
944945

945946
path: codeql_multimodal_reports.zip
946947

948+
pylint-scans:
949+
name: Run Pylint Scan
950+
if: ${{ (inputs.target == 'pylint-scan') || (inputs.target == 'all-scans') }}
951+
runs-on: ubuntu-24.04
952+
permissions:
953+
contents: read
954+
steps:
955+
- name: Checkout code
956+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
957+
with:
958+
persist-credentials: false
959+
960+
- name: Set up Python
961+
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.3.0
962+
with:
963+
python-version: '3.11'
964+
965+
- name: Install dependencies
966+
run: |
967+
python -m pip install --upgrade pip
968+
python -m pip install pylint
969+
970+
- name: Run Pylint
971+
env:
972+
APPLICATION: ${{ inputs.application }}
973+
run: |
974+
if [[ "$APPLICATION" == "time-series" || "$APPLICATION" == "both" ]]; then
975+
pylint manufacturing-ai-suite/industrial-edge-insights-time-series/ > manufacturing-ai-suite/industrial-edge-insights-time-series/pylint-report.txt 2>&1 || true
976+
fi
977+
if [[ "$APPLICATION" == "multimodal" || "$APPLICATION" == "both" ]]; then
978+
pylint manufacturing-ai-suite/industrial-edge-insights-multimodal/ > manufacturing-ai-suite/industrial-edge-insights-multimodal/pylint-report.txt 2>&1 || true
979+
fi
980+
981+
- name: Upload Pylint reports
982+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
983+
with:
984+
name: pylint-reports
985+
path: |
986+
manufacturing-ai-suite/industrial-edge-insights-time-series/pylint-report.txt
987+
manufacturing-ai-suite/industrial-edge-insights-multimodal/pylint-report.txt
947988

education-ai-suite/smart-classroom/content_search/docs/dev_guide/API_GUIDE.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Base URL: `http://<host>:9990`
1111
3. [Ingest Files](#ingest-files)
1212
- [Ingest a single file from MinIO](#ingest-a-single-file-from-minio)
1313
- [Ingest a directory from MinIO](#ingest-a-directory-from-minio)
14+
- [Ingest raw text](#ingest-raw-text)
1415
4. [Query Indexed Files](#query-indexed-files)
1516
5. [Delete Files from Index](#delete-files-from-index)
1617
6. [Clear the Entire Index](#clear-the-entire-index)
@@ -150,6 +151,7 @@ Ingests all supported files found under a given folder prefix in MinIO.
150151
|-------|------|----------|---------|-------------|
151152
| `bucket_name` | string | Yes || MinIO bucket name |
152153
| `folder_path` | string | Yes || Folder prefix inside the bucket |
154+
| `meta` | object | No | `{}` | Extra metadata applied to every file ingested from the directory |
153155
| `frame_extract_interval` | integer | No | `15` | For video files: extract a frame every N frames |
154156
| `do_detect_and_crop` | boolean | No | `false` | Run object detection and crop detected regions before embedding |
155157

@@ -174,6 +176,59 @@ curl -X POST http://localhost:9990/v1/dataprep/ingest \
174176
175177
---
176178

179+
#### Ingest raw text
180+
181+
### `POST /v1/dataprep/ingest_text`
182+
183+
Embeds a raw text string as a **single node** (no chunking) and stores it in the document collection. Use this when you already have clean, pre-processed text and want to skip file parsing entirely.
184+
185+
**Request body**
186+
187+
| Field | Type | Required | Default | Description |
188+
|-------|------|----------|---------|-------------|
189+
| `text` | string | Yes || Raw text content to embed and store |
190+
| `bucket_name` | string | No || MinIO bucket name (used to build the `file_path` identifier) |
191+
| `file_path` | string | No || Logical path inside the bucket (used to build the `file_path` identifier) |
192+
| `meta` | object | No | `{}` | Extra metadata to store alongside the text |
193+
194+
**Example**
195+
196+
```bash
197+
curl -X POST http://localhost:9990/v1/dataprep/ingest_text \
198+
-H "Content-Type: application/json" \
199+
-d '{
200+
"bucket_name": "my-bucket",
201+
"file_path": "summaries/lecture1.txt",
202+
"text": "Photosynthesis is the process by which plants convert light into energy.",
203+
"meta": { "course": "CS101", "source": "summary" }
204+
}'
205+
```
206+
207+
Below metadatas shall be automatically appended
208+
```json
209+
"meta": {
210+
"chunk_index": 0,
211+
"chunk_text": "text",
212+
"type": "document",
213+
"doc_filetype": "text/plain",
214+
}
215+
```
216+
217+
**Response**
218+
219+
```json
220+
{ "message": "Text successfully ingested. db returns ..." }
221+
```
222+
223+
**Error responses**
224+
225+
| Code | Condition |
226+
|------|-----------|
227+
| `400` | `text` is empty or missing |
228+
| `500` | Embedding or database error |
229+
230+
---
231+
177232
## Query Indexed Files
178233

179234
### `GET /v1/dataprep/get`

education-ai-suite/smart-classroom/content_search/file_ingest_and_retrieve/indexer.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,30 @@ def process_document(self, document_path, meta):
285285

286286
return entities
287287

288+
def process_text(self, text: str, meta: dict) -> list:
289+
"""Embed a raw text string as a single node (no chunking)."""
290+
meta_data = copy.deepcopy(meta)
291+
meta_data["chunk_text"] = text
292+
meta_data["chunk_index"] = 0
293+
294+
embedding = self.get_document_embedding(text)
295+
296+
if not self.document_db_inited:
297+
self.init_document_db_client(len(embedding))
298+
299+
node = create_chroma_data(embedding, meta_data)
300+
self._update_id_map(self.document_id_map, meta_data["file_path"], node["id"])
301+
return [node]
302+
303+
def ingest_text(self, text: str, meta: dict) -> dict:
304+
"""Ingest a single text string into the document collection without chunking."""
305+
if not text or not isinstance(text, str):
306+
raise ValueError("text must be a non-empty string.")
307+
308+
meta = {**meta, "type": "document", "doc_filetype": "text/plain"}
309+
entities = self.process_text(text, meta)
310+
return self.client.insert(collection_name=self.document_collection_name, data=entities)
311+
288312
def add_embedding(self, files, metas, **kwargs):
289313
if len(files) != len(metas):
290314
raise ValueError(f"Number of files and metas must be the same. files: {len(files)}, metas: {len(metas)}")

0 commit comments

Comments
 (0)