Use torch.accelerator API in mnist examples (#1334) #119
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Doc Build | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build_docs_job: | |
runs-on: ubuntu-latest | |
# Grant write permission here so that the doc can be pushed to gh-pages branch | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Dependencies | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get update | |
sudo apt install -y git python3-venv make | |
echo `python3 --version` | |
python3 -m venv venv | |
source venv/bin/activate | |
pip install --upgrade pip setuptools | |
id: build | |
- name: Build the docset | |
run: | | |
cd docs | |
pip install -r requirements.txt | |
make html | |
- name: Get output time | |
run: echo "The time was ${{ steps.build.outputs.time }}" | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages # The branch the action should deploy to. | |
FOLDER: ./docs/build/html # The folder the action should deploy. |