Skip to content

Make HSSMBase class#943

Draft
cpaniaguam wants to merge 84 commits intocp-main-sbfrom
942-create-basepy-anew-to-facilitate-merge-conflicts
Draft

Make HSSMBase class#943
cpaniaguam wants to merge 84 commits intocp-main-sbfrom
942-create-basepy-anew-to-facilitate-merge-conflicts

Conversation

@cpaniaguam
Copy link
Copy Markdown
Collaborator

@cpaniaguam cpaniaguam commented Apr 2, 2026

Create HSSMBase. Notably, starting from a copy of HSSM, we turn it into an abstract class and specifies the _make_model_distribution as abstract (needs to be specified in subclasses).

cpaniaguam and others added 30 commits February 18, 2026 10:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nly-models

Added `is_choice_only` field for `Config` class and updated tests
* initial poisson race implementation

* add to public api

* add basic test suite for poisson race

* fix formatting

* minimal tutorial notebook

* Update src/hssm/likelihoods/analytical.py

fix shape bounds

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/test_likelihoods_poisson_race.py

add pythonic syntax

Co-authored-by: Carlos Paniagua <cpaniaguam@gmail.com>

* fix formatting for test_likelihoods_poisson_race

* build bound dicts with comprehension

Co-authored-by: Carlos Paniagua <cpaniaguam@gmail.com>

* fix logp_poisson_race docstring

* fix docstring, add consitent safe usage

* fix formatting

* Update src/hssm/likelihoods/analytical.py

fix doctring typo

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix export in init

* fix docstring

* remove smooth uniform for poisson race

* fix parameter bounds

* update tutorial notebook

* address remaining comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Carlos Paniagua <cpaniaguam@gmail.com>
Co-authored-by: Alexander <alexanderfengler@gmx.de>
…ve-load

898 use temp folder in test save load
* small bugfix en route, and add tutorial on how to use Bayesflow lre

* add tutorial to docs correctly

* Update pyproject.toml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
digicosmos86 and others added 22 commits March 9, 2026 10:28
…ce-only

Update HSSM class for choice-only models
* fix: flaky test in test_data_validator due to valid choice in random range

The test sets choices=[0, 1, 2] but picks a supposedly invalid response
from range(2, 100). When random.choice returns 2, the response is
actually valid and no ValueError is raised, causing a flaky failure.
Changed to range(3, 100) to guarantee an invalid choice.

Made-with: Cursor

* fix: make data validator test deterministic and robust

Use a deterministic invalid response value and explicit response-column indexing to remove flaky randomness and schema-order brittleness in test_data_validator.

Made-with: Cursor
* fix: safe negative-RT handling and JAX backend for RDM3

- Replace element-wise jax_check_parameters for rt > 0 with jnp.where +
  LOGP_LB floor in logp_rdm3. This clamps negative decision times to a
  small epsilon before passing to the PDF/CDF, preventing NaN in the
  likelihood and providing a finite gradient floor per trial.
- Set backend to "jax" and add default HalfNormal priors for A and t in
  both racing_diffusion_3_config and rdm3_config.

Made-with: Cursor

* chore: remove unused rdm3_config.py

This file is dead code — the dynamic config loader in
modelconfig/__init__.py derives module names from the model name
"racing_diffusion_3", so only racing_diffusion_3_config.py is ever
loaded. rdm3_config.py was never imported or called.

Made-with: Cursor

* fix: plumb rdm3 epsilon and harden negative-RT floor

Pass logp_rdm3 epsilon through JAX RDM internals to keep clamping behavior consistent and preserve LOGP_LB dtype under JAX. Add a regression test ensuring rt<=t returns LOGP_LB and stays finite for RDM3.

Made-with: Cursor
* first hmm example

* Address PR #923 review comments on HMM-DDM notebook

- Update title to be more informative for broader audience
- Remove broken link to regime-switching-bayesian repo
- Add Forward Algorithm likelihood explanation blurb

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* some improvements to the notebook

* add new tutorials to mkdocs

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Update version for release

* Add prepare-release skill and GitHub workflow

- Claude Code skill (.claude/skills/prepare-release/SKILL.md) that automates
  the pre-release checklist: changelog update, announcement banner update,
  local docs build verification, and draft GitHub release creation
- GitHub Actions workflow (.github/workflows/prepare-release.yml) as an
  alternative agentic approach using claude-code-action with workflow_dispatch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Prepare v0.3.0 release: changelog, banner, docs fixes, and skill update

- Add v0.3.0 changelog entry to docs/changelog.md
- Update announcement banner to v0.3.0
- Fix mkdocs.yml: rename `import` to `inventories` for mkdocstrings-python 2.0
- Add poisson_race.ipynb to mkdocs execute_ignore list
- Add notebook check workflow step to prepare-release skill

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix notebooks for v0.3.0 release verification

- bayesflow_lre_integration: rename classifier_network → inference_network
  for bayesflow dev branch API compatibility
- initial_values: add cores=1, chains=1 to fix multiprocessing EOFError
- plotting: fix missing comma after sampler="numpyro"
- poisson_race: fix kernel spec hssm-dev → python3
- CI: add workshop_1 and workshop_2 notebooks to skip list
- pyproject.toml: move bayesflow+keras to notebook dep group, remove
  bayesflow optional extra (not yet released on PyPI)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add CLAUDE.md with project context for Claude Code

Provides project-scoped context: structure, tooling, dependency
management, common commands, key API patterns, CI workflows, and
known issues for better Claude Code assistance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* slight improvements to tests

* bump lanfactory and ssm-simulators versions

* bump bayesflow version

---------

Co-authored-by: Alexander <alexanderfengler@gmx.de>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* small improvements to claude

* some mypy formatting in the process of creating pre-commit harmony across projects

* Track uv.lock in version control

Remove uv.lock from .gitignore and commit the lockfile for reproducible
dev/CI environments. Raise check-added-large-files limit to 1000 KB.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Raise check-added-large-files limit to ~99.9 MB

Match GitHub's own 100 MB hard limit rather than imposing an artificial
lower threshold. Notebooks and lock files should not be blocked.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cpaniaguam cpaniaguam linked an issue Apr 2, 2026 that may be closed by this pull request
@cpaniaguam cpaniaguam marked this pull request as ready for review April 2, 2026 18:50
@cpaniaguam cpaniaguam requested a review from digicosmos86 April 2, 2026 18:50
@cpaniaguam cpaniaguam marked this pull request as draft April 2, 2026 19:26
@cpaniaguam cpaniaguam changed the base branch from main to cp-main-sb April 2, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create base.py anew to facilitate merge conflict resolution

5 participants