Skip to content

Add CMake and Bzlmod integration and prepare first release - #2

Merged
jhurliman merged 6 commits into
modernization/sampler-correctnessfrom
release/bazel-cmake
Sep 10, 2026
Merged

Add CMake and Bzlmod integration and prepare first release#2
jhurliman merged 6 commits into
modernization/sampler-correctnessfrom
release/bazel-cmake

Conversation

@jhurliman

@jhurliman jhurliman commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Stacked on #1. Prepare the first versioned release, 1.0.0, with a header-only CMake export (best_cpp::best_cpp) and public Bzlmod target (@bayes//:best_cpp). Tests, CLI and benchmark builds are opt-in. No third-party numerical libraries or worker-thread runtime dependencies are imposed on consumers.

Add installed CMake and renamed-repository Bazel consumers, independently compiled public headers, and an archive-based temporary BCR registry consumer with checksum verification. The registry generator preserves existing configuration; actual BCR submission waits for a public reviewed release archive. Include model/API documentation, compatibility notes, reproducibility and convergence limitations, release instructions, and a workload-specific performance comparison. Harden CLI parsing, including malformed trailing numeric tokens. Address the parent review finding by clamping initial sigmas to both prior bounds, with a highly imbalanced data regression.

Validation: 57 numerical/lifecycle checks; optimized and sanitizer Linux/macOS CI passed in #1. Local CMake library/tests/CLI/benchmark/install and independent consumer passed; Bazel 9.2 regression, renamed consumer and registry archive consumer passed. This PR adds Linux/macOS/Windows CMake CI plus Bazel CI. No tag or package has been published.

Addressed the API cleanup requested in #1 (comment): Init accepts only the starting state and log-posterior callback. Removed compatibility cases and updated the benchmark and documentation in the stack.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T16:40:47.444639Z 46a9b68 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46a9b68b6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CMakeLists.txt Outdated
@jhurliman
jhurliman added this pull request to stack #3 September 10, 2026 18:33
@jhurliman
jhurliman merged commit 307a9ad into master Sep 10, 2026
12 checks passed
@jhurliman
jhurliman deleted the release/bazel-cmake branch September 10, 2026 23:26
jhurliman added a commit that referenced this pull request Sep 10, 2026
The current sampler shares one RNG across worker threads, chooses the
first accepted speculative proposal, and can stop `Sample(n)` before
recording n samples. Replace that path with sequential adaptive
Metropolis-within-Gibbs: exactly one proposal per coordinate and one
retained state per completed sweep. Remove the obsolete thread-count
argument from AMWG::Init. Independent chains are the supported
parallelism model.

Fix model support (both sigma bounds and nu >= 1), log-density
underflow, precision loss, temporary observation lifetimes,
reinitialization, burn/storage coupling and empty/nonfinite statistics.
Add deterministic lifecycle checks, analytic density/posterior
references and fixed-seed normal/exponential distribution tests. This
deliberately changes inferred results and random sequences; migration
details are in CHANGELOG.md.

Validation: optimized C++17 regression tests pass locally; ASan/UBSan
passes with all 56 checks on Linux and macOS CI. CI runs optimized and
sanitized tests on Linux and macOS. Stacked PR #2 adds portable
packaging, independent consumers and release preparation. No release has
been published.


Addressed the API cleanup requested in
#1 (comment):
Init accepts only the starting state and log-posterior callback. Removed
compatibility cases and updated the benchmark and documentation in the
stack.
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