Skip to content

Commit

Permalink
add compile_logp convenience function (#607)
Browse files Browse the repository at this point in the history
* add compile_logp convenience function

* add convenience logp constructor from jax callable

* towards building hssm models from simulator and jax callable

* add tutorials

* small compile_logp test

* entering mypy hell

* reduce rv to one constructor

* update versions, run through tutorials
  • Loading branch information
AlexanderFengler authored Dec 28, 2024
1 parent 12100bd commit fd030b9
Show file tree
Hide file tree
Showing 33 changed files with 15,306 additions and 6,465 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/run_fast_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run fast tests

on:
pull_request:
workflow_call:

jobs:
run_tests:
runs-on: ubuntu-latest
if: ${{ ! contains(github.event.head_commit.message, '[skip fast tests]') }}
env:
PYTENSOR_FLAGS: "blas__ldflags=-L/usr/lib/x86_64-linux-gnu -lblas -llapack"

strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Poetry environment
uses: ./.github/setup-poetry-env
with:
python-version: ${{ matrix.python-version }}

- name: Run fast tests
run: poetry run pytest -n auto -s --ignore=tests/slow
env:
PYTENSOR_FLAGS: ${{ env.PYTENSOR_FLAGS }}

- name: Run jupyter notebooks in docs
run: poetry run mkdocs build
env:
PYTENSOR_FLAGS: ${{ env.PYTENSOR_FLAGS }}
35 changes: 35 additions & 0 deletions .github/workflows/run_slow_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run slow tests

on:
pull_request:
workflow_call:

jobs:
run_tests:
runs-on: ubuntu-latest
if: ${{ ! contains(github.event.head_commit.message, '[skip slow tests]') }}
env:
PYTENSOR_FLAGS: "blas__ldflags=-L/usr/lib/x86_64-linux-gnu -lblas -llapack"

strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Poetry environment
uses: ./.github/setup-poetry-env
with:
python-version: ${{ matrix.python-version }}

- name: Install hssm
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install --no-interaction

- name: Run slow tests
run: poetry run pytest -s tests/slow
env:
PYTENSOR_FLAGS: ${{ env.PYTENSOR_FLAGS }}
10 changes: 10 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## 0.2.x

### 0.2.5

This version of HSSM incorporated the following changes:

1. We added a new tutorial on how to use custom likelihood functions with HSSM.
2. Added convenience function `compile_logp()` to return a compiled log-likelihood function to be used freely downstream.
3. Some improvements to internals to allow for (1.)
4. Major improvments to plotting with `model_cartoon_plots()`
5. Refactoring and minor improvements to pre-existing plots

### 0.2.4

This version of HSSM incorporated the following changes:
Expand Down
2 changes: 1 addition & 1 deletion docs/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</span>
Navigate the site here!
</span>
<span class="right-margin"> v0.2.4 is released! </span>
<span class="right-margin"> v0.2.5 is released! </span>
<span>
<span class="twemoji">
{% include ".icons/material/head-question.svg" %}
Expand Down
3,773 changes: 3,773 additions & 0 deletions docs/tutorials/blackbox_contribution_onnx_example.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit fd030b9

Please sign in to comment.