Implement MS-TCM model with FRFR-category worked example and MLE/CI f… #1
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-*" ] | |
| 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 | |
| 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 2 --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 2 --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()]" |