Skip to content

Regenerate R parity cache for NNS 13.1 #7

Regenerate R parity cache for NNS 13.1

Regenerate R parity cache for NNS 13.1 #7

name: PR118 targeted parity diagnostics
on:
pull_request:
branches: [main]
push:
branches: [automation/r-cache-nns-13.1]
permissions:
contents: read
jobs:
diagnose:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: |
python -m pip install -U pip
python -m pip install build scikit-build-core nanobind pytest 'numpy<2.5' scipy hypothesis pytest-benchmark pytest-xdist
python -m pip install -e . --force-reinstall --no-deps
- name: Run targeted parity
continue-on-error: true
run: |
NNS_R_CACHE_ONLY=1 python -m pytest -q \
tests/parity/test_original_dependence.py \
tests/parity/test_diff.py \
tests/parity/test_r13_smoke.py \
tests/parity/test_var.py \
tests/parity/test_causation.py > pr118-targeted.log 2>&1
- name: Record seasonal lag diagnostics
run: |
python - <<'PY' > pr118-seasonal.txt
import numpy as np
from nns import nns_causation
from nns.seasonality import nns_seas
t=np.arange(1,71,dtype=float)
x=np.sin(2*np.pi*t/7)
y=np.roll(x,1)+0.05*np.cos(t/3)
print('x periods',nns_seas(x,plot=False)['periods'].tolist())
print('y periods',nns_seas(y,plot=False)['periods'].tolist())
for tx in range(1,9):
for ty in range(1,9):
a=nns_causation(x,y,tau=ty)
b=nns_causation(y,x,tau=tx)
print('same_tau',tx,ty,list(a.values()),list(b.values()))
t=np.arange(1,81,dtype=float)
z=[np.sin(2*np.pi*t/5),np.sin(2*np.pi*t/6+0.2),np.sin(2*np.pi*t/7+0.5)]
print('matrix periods',[nns_seas(v,plot=False)['periods'].tolist() for v in z])
PY
- uses: actions/upload-artifact@v4
with:
name: pr118-targeted-diagnostics
path: |
pr118-targeted.log
pr118-seasonal.txt