Skip to content

Add text summarization with LLM for the narrator demo #1387

Add text summarization with LLM for the narrator demo

Add text summarization with LLM for the narrator demo #1387

name: Sanity check (notebooks)
on:
schedule:
- cron: "0 2 * * *"
pull_request:
branches: [master]
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
find-subprojects:
runs-on: ubuntu-latest
outputs:
notebook: ${{ steps.categorize-subprojects.outputs.notebook }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine subprojects to test
id: find-updates
uses: ./.github/reusable-steps/find-updates
with:
dir: notebooks
ci_config_file: sanity-check-notebooks.yml
- name: Categorize subprojects
id: categorize-subprojects
uses: ./.github/reusable-steps/categorize-projects
with:
subprojects: ${{ steps.find-updates.outputs.subproject_dirs }}
notebook:
needs: find-subprojects
if: ${{ needs.find-subprojects.outputs.notebook != '[]' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# onnxruntime-openvino is not available on mac
os: [ubuntu-24.04, windows-2025]
python: ["3.10", "3.13"]
subproject: ${{ fromJson(needs.find-subprojects.outputs.notebook) }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/reusable-steps/setup-os
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: ./.github/reusable-steps/setup-python
with:
python: ${{ matrix.python }}
project: ${{ matrix.subproject }}
- name: Use downloaded video as a stream
shell: bash
run: |
cd ${{ matrix.subproject }}
# replace video_path with sample_video.mp4
find . -name "*.ipynb" -exec sed -E -i "s/video_path\s*=\s*(['\"]?.*?['\"]?)/video_path=\\\\\"sample_video.mp4\\\\\"\\\n\",/g" {} +
- name: Run Notebook
shell: bash
timeout-minutes: 30
run: |
cd ${{ matrix.subproject }}
jupyter nbconvert --to notebook --debug --execute *.ipynb