Training Workflow #15
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: Training Workflow | |
on: | |
workflow_dispatch: | |
inputs: | |
script_content: | |
description: 'Content of train.py' | |
required: true | |
type: string # Explicitly specify the type | |
jobs: | |
train: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
pip install -r ci-requirements.txt | |
- name: Create and run training script | |
run: | | |
echo "${{ inputs.script_content }}" > train.py | |
cat train.py # Debug: print the content | |
python train.py > training.log 2>&1 | |
- name: Upload logs | |
uses: actions/upload-artifact@v3 | |
if: always() # Upload logs whether the job succeeds or fails | |
with: | |
name: training-logs | |
path: training.log |