modrec-workflow/.riahub/workflows/workflow.yaml

116 lines
3.1 KiB
YAML
Raw Normal View History

2025-05-14 15:40:08 -04:00
name: RIA Hub Workflow Demo
on:
push:
branches:
[main]
pull_request:
branches:
[main]
2025-05-14 15:40:08 -04:00
jobs:
ria-demo:
runs-on: ubuntu-latest-2080
steps:
- name: Print GPU information
run: |
if command -v nvidia-smi &> /dev/null; then
echo "✅ NVIDIA GPU is available"
nvidia-smi
else
echo "⚠️ No NVIDIA GPU found"
fi
- name: Checkout code
uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
2025-06-13 13:58:35 -04:00
- name: 1. Generate Recordings
run: |
mkdir -p data/recordings
2025-06-13 14:19:25 -04:00
PYTHONPATH=. python scripts/dataset_building/generate_modulated_signals.py --output-dir data/recordings
2025-06-13 13:58:35 -04:00
echo "recordings produced successfully"
- name: Upload Recordings
uses: actions/upload-artifact@v3
with:
name: recordings
path: data/recordings/**
- name: 2. Build HDF5 Dataset
2025-05-26 12:04:20 -04:00
run: |
mkdir -p data/dataset
2025-06-13 13:58:35 -04:00
PYTHONPATH=. python scripts/dataset_building/produce_dataset.py
2025-05-26 12:04:20 -04:00
echo "datasets produced successfully"
shell: bash
- name: Upload Dataset Artifacts
uses: actions/upload-artifact@v3
with:
name: ria-dataset
path: data/dataset/**
2025-06-13 13:58:35 -04:00
- name: 3. Train Model
2025-05-23 10:06:46 -04:00
env:
NO_NNPACK: 1
2025-05-23 10:10:07 -04:00
PYTORCH_NO_NNPACK: 1
run: |
2025-06-13 13:58:35 -04:00
PYTHONPATH=. python scripts/training/train.py
echo "training model"
- name: Upload Checkpoints
uses: actions/upload-artifact@v3
with:
name: ria-checkpoints
path: checkpoint_files/inference_recognition_model.ckpt
2025-05-14 15:40:08 -04:00
2025-06-13 13:58:35 -04:00
- name: 4. Convert to ONNX file
run: |
MKL_DISABLE_FAST_MM=1 PYTHONPATH=. python onnx_scripts/convert_to_onnx.py
echo "building inference app"
- name: Upload ONNX file
uses: actions/upload-artifact@v3
with:
name: ria-demo-onnx
path: onnx_files/inference_recognition_model.onnx
2025-05-26 10:28:11 -04:00
2025-06-13 13:58:35 -04:00
- name: 5. Profile ONNX model
2025-05-26 10:28:11 -04:00
run: |
PYTHONPATH=. python onnx_scripts/profile_onnx.py
- name: Upload JSON profiling data
uses: actions/upload-artifact@v3
with:
name: profile-data
path: '**/onnxruntime_profile_*.json'
2025-06-13 13:58:35 -04:00
- name: 6. Convert to ORT file
run: |
python -m onnxruntime.tools.convert_onnx_models_to_ort \
2025-05-26 11:09:09 -04:00
/workspace/qoherent/modrec-workflow/onnx_files/inference_recognition_model.onnx \
2025-05-26 11:25:01 -04:00
--output_dir ort_files \
2025-05-26 10:28:11 -04:00
--optimization_style Fixed \
--target_platform amd64
2025-05-14 15:40:08 -04:00
- name: Upload ORT file
uses: actions/upload-artifact@v3
with:
name: ria-demo-ort
path: ort_files/inference_recognition_model.ort