Skip to content

Releases: williambdean/modist

v0.7.1

Choose a tag to compare

@williambdean williambdean released this 17 Sep 12:47
58ecda1

v0.7.1

Bug-fix release:

  • Reset button respects constructor inputs — the reset button now restores
    the params the widget was created with (Normal(sigma=5) resets to σ=5, not
    back to the family default σ=1). Added a regression probe in
    tests/js/reset.test.mjs.
  • Removed dead code in js/base.js — the unused support() wrapper and an
    unused currentDomain() read inside redraw.
  • Clear marimo version floor for the panel modules — md.ui.create_tabs /
    md.pymc.create_priors build mo.ui.tabs(orientation=...), which needs
    marimo ≥ 0.24. Older marimo now raises an actionable ImportError instead of
    a cryptic TypeError from tabs.__init__, and the pymc/dev extras
    install marimo>=0.24. md.ui.create_stack keeps working on older marimo.

v0.7.0

Choose a tag to compare

@williambdean williambdean released this 08 Sep 06:49
fbb909a

What's new in v0.7.0

This release expands modist from 4 to 15 interactive distribution families —
an 11-family jump for prior elicitation:

New families

  • Continuous, unbounded: Cauchy, Laplace, Logistic
  • Non-negative / edge at 0: Exponential, HalfNormal, LogNormal,
    HalfStudentT, ChiSquared, Weibull, InverseGamma
  • Bounded: Kumaraswamy (fixed [0, 1])

Every family follows the same interaction vocabulary — drag the center
line/dot to translate, the quantile squares to reshape — and keeps canonical
parameter names
, so .value splats straight into pm.<Family>.dist(**value)
and the PyMC ops.

Seeding and aliases

  • Constructor kwargs now resolve through the distparams ecosystem names
    (e.g. Gamma(shape=…), rate=… → alpha/beta) via _registry_key +
    _registry_param_map.
  • Wider pymc integration: more root priors are detected and seeded from
    pm.Model (_DIST_REGISTRY).

Showcase

  • New gallery-ready demos/overview.py: table-backed family picker, live
    .value/.params readout, scipy stats chips, quantile probe, draws-vs-density
    plot, md.ui prior panels, and a PyMC section that verifiably backs off on
    WASM kernels. WASM-first: runs end to end in the browser via Pyodide.

Fixes

  • Area fill no longer drifts off-axis when the curve is clipped at an edge.

Bundles

  • src/modist/static/*.js and dist/modist.js rebuilt at v0.7.0 with banners
    stamped; standalone bundle pinned via
    https://cdn.jsdelivr.net/gh/williambdean/modist@v0.7.0/dist/modist.js.

Full diff: git diff v0.6.0..v0.7.0

v0.6.0

Choose a tag to compare

@williambdean williambdean released this 07 Sep 06:22
d58bb8a

v0.6.0

This release makes modist usable without Python: the widgets are now
available as a standalone client-side bundle for JS-only projects, shipped in the
same distribution story as the anywidget bundles.

Standalone JS for JS-only consumers

  • New dist/modist.js — a single-file ESM bundle (package.json: jstat dep)
    exposing normal, beta, gamma, studentT factories that mount a widget
    into any element and return a handle (params / set / reset / onChange
    / destroy). See site/index.html.
  • Live showcase: https://williambdean.github.io/modist/ — tabbed Normal /
    Beta / Gamma / StudentT widgets, copy-able import snippets, and a Python /
    marimo quickstart (including the reactive w.scipy / w.pymc adapters).
  • Pinned, immutable URLs: https://cdn.jsdelivr.net/gh/williambdean/modist@v0.6.0/dist/modist.js
    (jsDelivr GH tags serve the committed bundle; CORS *).

Supply-chain hygiene

  • jStat is now an npm-managed dependency (jstat@1.9.6) instead of a vendored
    esm.sh blob whose license header had been stripped when minified.
  • /*! banners on all bundles credit modist (MIT) and jStat (MIT), and the
    publish workflow gates releases on an MIT-only license-checker pass.
  • npm Dependabot keeps the JS deps monitored.

Showcase / packaging

  • Advertise the Pages showcase URL in [project.urls] (Showcase) and as the
    GitHub repo homepage.
  • The showcase inline-bundles the standalone JS (runs from file://), mounts
    families lazily in tabs, and self-updates its pinned-import snippet to the
    current release tag at build time.

v0.5.0

Choose a tag to compare

@williambdean williambdean released this 05 Sep 14:34
53ed3d2

What's Changed

This release hardens the PyMC integration: widget seeding from constant model params is now more accurate, and prior sampling is cached so the panel stays stable when embedded in marimo tabs.

PyMC integration (modist.pymc)

  • More accurate constant-param seeding — widget seeding now constant-folds each RV op-input with pymc's own rewriting (constant_fold), so broadcasts, casts, stacked lists, and Gamma's rate→scale transform all resolve to the exact user-facing value. Per-family _op_param_order pins the true op-input order (e.g. StudentT is (nu, mu, sigma)), and Gamma's reciprocal(beta) is descended to recover the exact rate under pymc ≥ 6 and pymc 5.
  • Prior-sample caching across tab switches — ModelPriors.draw and sample_prior_predictive now share a single-entry cache keyed by draw count + input values. A re-run with unchanged widgets returns the same draws/DataTree instead of re-sampling. This keeps the panel stable when embedded in marimo tabs: switching tabs remounts the anywidgets, which re-emit their values and re-run dependent cells — but identical values no longer trigger a fresh sampler run. Dragging a prior (or passing overrides) changes the key and produces a fresh sample.

Demos

  • Added a pymc prior-predictive demo and updated demos/regression.py.

New Contributors

No new contributors this release.

Full Changelog: v0.4.0...v0.5.0

v0.4.0

Choose a tag to compare

@williambdean williambdean released this 03 Sep 11:33
130d967

What's Changed

This release improves the axis tick rendering for readability, and
substantially expands the PyMC integration with nested prior groups,
initial-selection support, and more robust distribution parsing.

Axis & rendering

  • Major/minor tick system — labeled major ticks plus unlabeled minor
    gridlines, so axes read cleanly at any scale.
  • Continuously scale tick density with label width (damped for
    high-precision scales) — reasonable ranges show more numbers, while
    extremely large/small scales stay sparse. No hard tiers means no jarring
    tick-count jumps when panning/zooming.
  • Uniformly spaced, omitted-when-crowded minors — minors subdivide
    proportionally to major density (dropped when majors are dense) and land on
    an even lattice, fixing uneven or missing minor gridlines.
  • Precision & formatting — tick labels keep their own step precision, and
    comma-formatted values (e.g. 10,000,000) are preserved instead of flipping
    between commas and exponential notation. Exponential is reserved for
    genuinely astronomical values.

PyMC integration (modist.pymc)

  • Nested tab groups for 2-D+ priors — the first dimension becomes outer
    tabs and the second becomes inner tabs (e.g. dims=("geo", "product") →
    outer tabs A/B/C, inner tabs 1/2/3/4); third+ dims flatten into composite
    inner labels.
  • Robust distribution parameter parsing — unwraps pymc's op-input
    transforms (DimShuffle broadcasts, Elemwise(reciprocal)) so per-element
    seeding works with dims'd models, and Gamma's rate/scale parameterization
    is parsed correctly.

UI (modist.ui)

  • selected / selected property — open a specific tab initially via a
    string (flat) or a nested path (e.g. ["alpha", "north"]), and read the
    currently selected tab path from the panel.
  • elements and selected properties exposed on Priors panels, excluding
    internal layout bookkeeping.

Tests & demos

  • New ticks integration probe covering tick density, comma/decimal
    formatting, origin labels, and uniform minor spacing across PyMC-relevant
    scales.
  • Expanded pymc and ui test coverage; updated demo defaults.

New Contributors

No new contributors this release.

Full Changelog: v0.3.0...v0.4.0

v0.3.0

Choose a tag to compare

@williambdean williambdean released this 02 Sep 11:13
9ce7f35

What's New

  • Grouped-priors UI — md.ui.create_tabs / create_stack for tabbed/stacked prior panels, with lazy md.ui import (marimo optional for plain import modist)
  • Nested prior widgets — hyperprior widgets render as nested tab groups
  • Vector RV sizing — create_priors correctly sizes vector priors (shape=, size=)
  • Pymc integration — md.pymc.create_priors compiles a sampler from any pm.Model, per-element widgets for dims-valued priors, sample_prior_predictive for xr.DataTree output, set_distributions to rebuild and pm.sample; auto-maps common pymc families, unwraps XRV wrapper ops (pymc_marketing/pymc-extras), and supports pymc.dims xtensor models

Full Changelog

v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@williambdean williambdean released this 01 Sep 13:17
2289771

What's New

  • StudentT prior support — vertical tails dial UI for StudentT distributions
  • .prior property — pymc-extras Prior adapter for convenience prior creation
  • Jupyter improvements — dev extras, improved examples, and notebook compatibility

Full Changelog

v0.1.1...v0.2.0

v0.1.1

Choose a tag to compare

@williambdean williambdean released this 01 Sep 06:00
cec50bc

Full Changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@williambdean williambdean released this 01 Sep 05:49
672a9d2