Skip to content

add benchmark results for checkpoints in guide #46

add benchmark results for checkpoints in guide

add benchmark results for checkpoints in guide #46

name: deploy-guide-dev
# Only run this when the master branch changes
on:
push:
branches:
- main
# This job installs dependencies, build the guide, and pushes it to `gh-pages`
jobs:
deploy-guide-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache checkpoints and data
uses: actions/cache@v4
with:
path: |
~/.cache
data-cifar10
key: ${{ runner.os }}-${{ hashFiles('setup.py') }}
- uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install PyTorch without CUDA
run: pip install torch torchvision -i https://download.pytorch.org/whl/cpu
- name: Install dependencies
run: |
pip install .[dev,test]
sudo apt install jq
# make sure KernelSpec in all notebooks is python3
- name: Normalize KernelSpec
run: |
for fn in guide/*.ipynb; do
jq '(.metadata.kernelspec.name,.metadata.kernelspec.display_name)="python3"' ${fn} > ${fn}_
mv ${fn}_ ${fn}
done
- name: Build the artwork for guide
run: cd guide && python artwork.py
- name: Download data
run: cd guide && python download_data.py
- name: Build the guide
run: cd guide && cp _config_dev.yml _config.yml && jupyter-book build -W --keep-going .
# Push the book's HTML to gh-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./guide/_build/html
destination_dir: dev
# force_orphan: true # broken: needs peaceiris/actions-gh-pages@v4