Simplify our docs with complicated functions into utils (#1807)
Co-authored-by: Chayenne <zhaochenyang@ucla.edu>
This commit is contained in:
42
.github/workflows/execute-notebook.yml
vendored
Normal file
42
.github/workflows/execute-notebook.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Execute Notebooks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
run-all-notebooks:
|
||||
runs-on: 1-gpu-runner
|
||||
if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bash scripts/ci_install_dependency.sh
|
||||
pip install -r docs/requirements.txt
|
||||
|
||||
- name: Setup Jupyter Kernel
|
||||
run: |
|
||||
python -m ipykernel install --user --name python3 --display-name "Python 3"
|
||||
|
||||
- name: Execute notebooks
|
||||
run: |
|
||||
cd docs
|
||||
for nb in *.ipynb; do
|
||||
if [ -f "$nb" ]; then
|
||||
echo "Executing $nb"
|
||||
jupyter nbconvert --to notebook --execute --inplace "$nb" \
|
||||
--ExecutePreprocessor.timeout=600 \
|
||||
--ExecutePreprocessor.kernel_name=python3
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user