MS-TCM Iteration 4: switch to OQ3 option (iii); SPC scallops captured #22
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ main, "001-*", "002-*" ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[dev]" | |
| - name: Unit tests (fast) | |
| run: pytest code/tests -q | |
| - name: Validate bundled dataset | |
| run: ms-tcm validate data/raw/frfr_category | |
| - name: Smoke fit (MS-TCM) | |
| run: ms-tcm fit data/raw/frfr_category --out runs/ci/mstcm --seed 42 --n-bootstraps 5 --n-restarts 1 --force | |
| - name: Smoke fit (standard TCM) | |
| run: ms-tcm fit data/raw/frfr_category --out runs/ci/tcm --seed 42 --standard-tcm --n-bootstraps 5 --n-restarts 1 --force | |
| - name: Print MLEs | |
| run: python -c "import json; s=json.load(open('runs/ci/mstcm/fit_summary.json')); [print(n, ':', info['mle']) for n, info in s['parameters'].items()]" | |
| - name: Cross-platform fixture (T053) | |
| run: pytest code/tests/test_cross_platform.py -q -m slow | |
| jax: | |
| name: Tier 2 JAX (${{ matrix.dtype }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dtype: [float64, float32] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install with [jax] extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[dev,jax]" | |
| - name: Run JAX backend tests | |
| env: | |
| MS_TCM_JAX_DTYPE: ${{ matrix.dtype }} | |
| run: pytest code/tests/test_jax_backend.py -v -m "slow or not slow" |