Skip to content

Commit f0e8c4a

Browse files
ryan-williamsclaude
andcommitted
Add Modal GPU benchmark workflow (push-triggered for iteration)
Temporary `push: branches: [modal-benchmark]` trigger for iterating on the benchmark. Will switch to `workflow_dispatch` only before merging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 960a3db commit f0e8c4a

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: GPU Benchmark (Modal)
2+
3+
on:
4+
push:
5+
branches: [modal-benchmark]
6+
workflow_dispatch:
7+
inputs:
8+
gpu:
9+
description: 'GPU type (L4, A10G, A100, H100)'
10+
default: 'L4'
11+
type: string
12+
epochs:
13+
description: 'Number of training epochs'
14+
default: '5'
15+
type: string
16+
channels:
17+
description: 'Number of model channels (8=tiny, 32=prod, 64=large)'
18+
default: '32'
19+
type: string
20+
residual_blocks:
21+
description: 'Number of residual blocks (2=tiny, 16=prod)'
22+
default: '16'
23+
type: string
24+
samples:
25+
description: 'Number of samples from Volume (0=all 2885)'
26+
default: '50'
27+
type: string
28+
wandb_project:
29+
description: 'WandB project name'
30+
default: 'elf-net-ci'
31+
type: string
32+
33+
jobs:
34+
benchmark:
35+
runs-on: ubuntu-latest
36+
env:
37+
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
38+
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: astral-sh/setup-uv@v5
42+
- uses: actions/setup-python@v5
43+
with:
44+
python-version: "3.12"
45+
46+
- name: Install Modal
47+
run: uv pip install --system modal
48+
49+
- name: Run benchmark
50+
env:
51+
GPU: ${{ inputs.gpu || 'L4' }}
52+
EPOCHS: ${{ inputs.epochs || '5' }}
53+
CHANNELS: ${{ inputs.channels || '32' }}
54+
RESIDUAL_BLOCKS: ${{ inputs.residual_blocks || '16' }}
55+
SAMPLES: ${{ inputs.samples || '50' }}
56+
WANDB_PROJECT: ${{ inputs.wandb_project || 'elf-net-ci' }}
57+
run: |
58+
modal run modal/benchmark.py \
59+
--gpu "$GPU" \
60+
--epochs "$EPOCHS" \
61+
--channels "$CHANNELS" \
62+
--residual-blocks "$RESIDUAL_BLOCKS" \
63+
--samples "$SAMPLES" \
64+
--wandb-project "$WANDB_PROJECT"

0 commit comments

Comments
 (0)