Repository navigation
Description
Tracking issue for the internals/API cleanup that should land together for v0.5.0. The individual pieces each have their own issue, but they interlock — the dedupe work shrinks the surface the typing and API changes have to touch, and the API unification is the breaking change that sets the version bump — so ordering matters more than it looks from any one issue.
The pieces
1. Code dedupe — #131
Collapse the per-observation-model likelihood/gradient/hessian implementations into shared kernels with one dispatch point per observation model.
- Likelihoods — Fix/131 dedupe lds likelihoods #135
- Gradients — Dedupe LDS gradients into shared kernels #136 (stacked on Fix/131 dedupe lds likelihoods #135, retarget to
devafter merge) - Hessians — Start Hessian depduplication. #141 (stacked on Dedupe LDS gradients into shared kernels #136, ibid.)
Why first: every later step (typing, API) touches these functions. Doing dedupe first means we loosen/rework each computation in one place instead of three.
2. Public API unification — #139
One joint_loglikelihood(lds, x, y; latent_inputs, obs_inputs) shape: model-first, scalar return, fit!-format trials, kwargs matching fit!. Same treatment should extend to the other user-facing functions where argument order / return shape currently varies.
- Settle the open design question: plain kwargs vs. the
Data-struct direction from the Fix/131 dedupe lds likelihoods #135 review thread (blocks Feature/input basis #127, which modifiesData) - Implement over the deduped kernels
- CHANGELOG migration notes (this is the breaking change → v0.5.0)
3. Typing refactor — #137
Base.eltype overloads + type promotion instead of over-restrictive signatures; better interop with non-standard matrix types.
- Audit signatures after dedupe (far fewer to touch then)
- Can slip past 0.5.0 if it drags — it's additive-loosening, not breaking
4. Threading — #138
Evaluate OhMyThreads.jl vs. current Threads.@spawn usage.
- Benchmark before committing; no API impact, safe to defer to 0.5.x (see Swap Base.Threads for OhMyThreads.jl #143)
Downstream / related (not part of this track, but sequenced by it)
- Feature/input basis #127 (input bases) — blocked on the Unify the joint_loglikelihood API (model-first, scalar, fit!-format trials) #139
Datadecision; changes requested - Feature/null models #126 (null models) — wants Feature/input basis #127's inputs machinery; changes requested
- feature: SSID init #129 (SSID init) — additive, independent; CI red + conflicts, fine as 0.5.x
Rough order
#135 → #136 → hessian dedupe → #139 decision + implementation → #127 → #126, then CHANGELOG + version bump to 0.5.0 and release from dev. #137/#138/#129 ride along if ready, otherwise 0.5.x.
Activity
rsenne commentedon Jul 9, 2026
@harrisonritz another claude slop issue just dropped. I wanted this to be our "umbrella" issue that we can track any API facing changes. This one does reasonably align with my thoughts but it isn't perfect. I think while the de-dupe code isn't perfect, and some other code should have come before it--it'll be more painful fixing the other, more foundational issues, then rebasing. So if its cool with you I think we can knock out most of the reduction in duplication, then we can go back and start unifying pieces? Thoughts? Objections?