Simple Notebook Run #28
This file contains 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: Notebook-Run | |
on: | |
workflow_dispatch: | |
inputs: | |
notebookFile: | |
description: 'Notebook to run (inside notebook dir)' | |
required: true | |
default: 'trainer-v4-unit-test/model-init.ipynb' | |
gpuTarget: | |
description: 'GPU Target (use either 8x12vgb / 1x24vgb)' | |
# required: true | |
default: '1x24vgb' | |
cudaVersion: | |
description: 'cuda version' | |
# required: true | |
default: '11-8' | |
huggingFaceRepo: | |
description: 'Hugging Face repo to upload to' | |
default: 'rwkv-x-dev/rwkv-x-playground' | |
env: | |
# Notebook runner settings | |
gpuTarget: ${{github.event.inputs.gpuTarget}} | |
cudaVersion: ${{github.event.inputs.cudaVersion}} | |
notebookFile: ${{github.event.inputs.notebookFile}} | |
huggingFaceRepo: ${{github.event.inputs.huggingFaceRepo}} | |
# Cache dir size limit | |
RUNNER_CACHE_SIZE_LIMIT: 100G | |
# Secrets | |
HUGGING_FACE_HUB_TOKEN: ${{secrets.HUGGING_FACE_HUB_TOKEN}} | |
WANDB_API_KEY: ${{secrets.WANDB_API_KEY}} | |
jobs: | |
notebook-run: | |
# Due to github worker hard limitation, of 24 hours | |
# we apply a timeout of 23 hours instead. | |
timeout-minutes: 1380 | |
name: ${{github.event.inputs.notebookFile}} - ${{github.event.inputs.gpuTarget}} / cuda-${{github.event.inputs.cudaVersion}} | |
runs-on: | |
- cuda-${{github.event.inputs.cudaVersion}} | |
- ${{github.event.inputs.gpuTarget}} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Run the notebook, with harness | |
run: | | |
cd ./notebook/github-runner | |
chmod +x ./github-runner.sh | |
./github-runner.sh "${{github.event.inputs.notebookFile}}" | |
- name: Save output notebook | |
uses: actions/upload-artifact@v3 | |
with: | |
name: output-notebook | |
path: | | |
output | |
- name: Upload outputs to HF | |
run: | | |
cd ./notebook/github-runner | |
python3 ./hf-upload.py "${{github.event.inputs.notebookFile}}" "${{github.event.inputs.huggingFaceRepo}}" |