Skip to content

Training Workflow

Training Workflow #92

name: AMD PyTorch Job
on:
workflow_dispatch:
inputs:
script_content:
description: 'Content of train.py'
required: true
type: string
jobs:
train:
runs-on: [amdgpu-mi250-x86-64]
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install numpy
pip install torch --index-url https://download.pytorch.org/whl/rocm6.2
- name: Create training script
shell: python
run: |
with open('train.py', 'w') as f:
f.write('''${{ github.event.inputs.script_content }}''')
- name: Run training script
run: |
python train.py > training.log 2>&1
- name: Upload logs
uses: actions/upload-artifact@v3
if: always()
with:
name: training-logs
path: training.log