Skip to content

gkielian is testing out GitHub Actions πŸš€ #12

gkielian is testing out GitHub Actions πŸš€

gkielian is testing out GitHub Actions πŸš€ #12

name: Basic Installation and CPU Training Test
run-name: ${{ github.actor }} is testing out GitHub Actions πŸš€
on: [push]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "πŸ’‘ The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "πŸ–₯️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
# Caching pip dependencies
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_cpu.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: install deps for cpu inference
run: |
python3 -m pip install --upgrade pip
python3 -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
python3 -m pip install -r requirements_cpu.txt
- name: run small network for cpu inference test
run: |
python3 data/shakespeare_char/prepare.py
python3 train.py --device=cpu --eval_iters=1 --log_interval=1 --block_size=2 --batch_size=2 --n_layer=2 --n_head=2 --n_embd=16 --max_iters=2 --lr_decay_iters=2 --dropout=0.0
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: run small inference
run: |
python3 sample.py --device=cpu --out_dir="out"