Files
RuView/.github/workflows/csi-encoder-training.yml
T

114 lines
4.8 KiB
YAML

name: CSI encoder training harness
on:
pull_request:
paths:
- 'scripts/csi_training/**'
- 'scripts/field-context-probe/**'
- 'scripts/active-kge/**'
- 'scripts/pretrain-csi-predictive.py'
- 'scripts/pretrain-csi-transfer.py'
- 'scripts/benchmark-csi-intake.py'
- 'scripts/evaluate-active-evidence.py'
- 'scripts/verify-active-replay.py'
- 'scripts/train-csi-encoder.py'
- 'scripts/train-espfi.py'
- 'scripts/improve-espfi.py'
- 'scripts/improve-espfi-kernel.py'
- 'scripts/improve-espfi-blend.py'
- 'scripts/requirements-espfi-training.txt'
- 'scripts/requirements-espfi-inference.txt'
- 'scripts/requirements-csi-training.txt'
- 'scripts/requirements-zenodo-intake.txt'
- 'scripts/tests/test_csi_training*.py'
- 'scripts/tests/test_espfi*.py'
- '.github/workflows/csi-encoder-training.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
synthetic-cpu-contract:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: '3.12'
- name: Install pinned CPU training dependencies
run: |
python -m pip install torch==2.11.0 --index-url https://download.pytorch.org/whl/cpu
python -m pip install -r scripts/requirements-csi-training.txt
python -m pip install -r scripts/requirements-espfi-training.txt
python -m pip install -r scripts/requirements-zenodo-intake.txt
- name: Validate real training code using temporary synthetic data
env:
PYTHONPATH: scripts
OPENBLAS_NUM_THREADS: '1'
OMP_NUM_THREADS: '1'
run: python -m unittest discover -s scripts/tests -p 'test_csi_training*.py' -v
- name: Validate public amplitude intake and optimization with synthetic fixtures
env:
PYTHONPATH: scripts
OPENBLAS_NUM_THREADS: '1'
OMP_NUM_THREADS: '1'
run: python -m unittest discover -s scripts/tests -p 'test_espfi*.py' -v
- name: Enforce capture data policy
run: bash scripts/csi-data-policy-check.sh --tracked
- name: Validate native feature bounds with sanitizers
run: |
cc -std=c11 -O1 -g -fno-fast-math -ffp-contract=off \
-fsanitize=address,undefined -fno-omit-frame-pointer \
scripts/csi_training/espfi_motion_native.c \
scripts/csi_training/espfi_motion_native_probe.c \
-lm -o "$RUNNER_TEMP/espfi-native-probe"
"$RUNNER_TEMP/espfi-native-probe"
field-context-contract:
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: scripts/field-context-probe
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Install fixed Rust toolchain
run: rustup toolchain install 1.90.0 --profile minimal
- name: Verify actual field and graph library contracts
run: cargo +1.90.0 test --locked
- name: Exercise synthetic evidence pipeline
run: cargo +1.90.0 run --locked --quiet --bin ruview-field-context-probe
- name: Exercise active evidence lifecycle
run: cargo +1.90.0 run --locked --quiet --bin ruview-field-context-probe -- --active-loop
active-kge-contract:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: '22'
- name: Install exact KGE experiment dependency
working-directory: scripts/active-kge
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Validate actual trained KGE and bounded artifact contract
working-directory: scripts/active-kge
run: npm test
- name: Install fixed Rust toolchain
run: rustup toolchain install 1.90.0 --profile minimal
- name: Feed actual KGE proposals through Rust authority boundary
run: |
node scripts/active-kge/cli.mjs --train "$RUNNER_TEMP/kge" --context context_1_8 > "$RUNNER_TEMP/ranking.json"
cargo +1.90.0 run --locked --quiet --manifest-path scripts/field-context-probe/Cargo.toml -- --active-loop > "$RUNNER_TEMP/reference.json"
cargo +1.90.0 run --locked --quiet --manifest-path scripts/field-context-probe/Cargo.toml -- --active-loop --ranking "$RUNNER_TEMP/ranking.json" > "$RUNNER_TEMP/candidate.json"
python scripts/verify-active-replay.py "$RUNNER_TEMP/reference.json" "$RUNNER_TEMP/candidate.json"