Skip to content

Adapt to beast-base Scalable contract change#29

Open
alexeid wants to merge 1 commit intomasterfrom
scalable-contract
Open

Adapt to beast-base Scalable contract change#29
alexeid wants to merge 1 commit intomasterfrom
scalable-contract

Conversation

@alexeid
Copy link
Copy Markdown
Contributor

@alexeid alexeid commented May 1, 2026

Summary

Migration to the new beast.base.inference.Scalable contract introduced in CompEvol/beast3#70:

  • scale(double) return type int → double log Jacobian
  • getScalableValue() added (default setScalableValue inherited)

Two files affected (the only places in this repo that touch Scalable directly):

  • PrevalenceList: scale now returns nodes.size() * Math.log(fScale); new getScalableValue() returns the sum of m_fTime values across items associated with a node — the s-equivariant summary under the existing scale operation.
  • TreeScaleOperator: consume tree.scale() return as double log Jacobian; HR factored as treeLogJacobian − 2 × log(scale) for the kernel-symmetry term. The pre-existing // TODO: check the HastingsRatio about the prevalence list's contribution is preserved verbatim.

Why

CompEvol/beast3#70 turns Scalable into a binding three-method contract whose invariants are mutually consistent on a single dilation axis. Any downstream package that implements Scalable directly needs the corresponding update; this is BEASTLabs's. Verified by parallel testing against the beast3 branch.

Requires

beast-base 2.8.0-SNAPSHOT or newer with the contract change merged.

Test plan

  • All 83 BEASTLabs tests pass against beast3:scalable-contract (locally installed)

See also

CompEvol/beast3#70 — full motivation and contract description.

beast-base/CompEvol#20 introduces a binding three-method Scalable
contract: scale returns log Jacobian (double) instead of dof (int);
adds getScalableValue / setScalableValue (default).

PrevalenceList:
  * scale return type int -> double, returns nodes.size() * log(scale)
  * adds getScalableValue() returning the sum of m_fTime values across
    items associated with a node (the s-equivariant summary under the
    existing scale operation)

TreeScaleOperator:
  * consume tree.scale() return as double log Jacobian, factor the HR
    as treeLogJacobian - 2 * log(scale) for the kernel-symmetry term
  * list.scale() return discarded (existing TODO about list HR
    contribution preserved verbatim)

Tested against beast3 scalable-contract branch: all 83 BEASTLabs
tests pass.

Requires beast-base 2.8.0-SNAPSHOT or newer with the contract change.
@alexeid alexeid marked this pull request as ready for review May 1, 2026 23:01
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.

1 participant