Skip to content

Add functors for the embedded Laplace approximation #1513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 49 commits into
base: master
Choose a base branch
from

Conversation

WardBrian
Copy link
Member

This is a draft until stan-dev/math#3097 is updated and merged. It could probably also do with some more code-gen tests.

Similar to reduce_sum, these functions have too many rules to fit into the general variadic framework, so they have custom typechecking and errors, which make up most of this PR.

Closes #1511

Submission Checklist

Release notes

Added new functions for the embedded Laplace approximation.

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@WardBrian WardBrian linked an issue Apr 18, 2025 that may be closed by this pull request
Copy link

codecov bot commented Apr 21, 2025

Codecov Report

Attention: Patch coverage is 96.50655% with 8 lines in your changes missing coverage. Please review.

Project coverage is 89.76%. Comparing base (93cda2f) to head (4e51cb8).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/frontend/Typechecker.ml 96.33% 4 Missing ⚠️
src/frontend/SignatureMismatch.ml 90.90% 3 Missing ⚠️
src/frontend/Semantic_error.ml 97.67% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1513      +/-   ##
==========================================
+ Coverage   89.60%   89.76%   +0.15%     
==========================================
  Files          66       66              
  Lines        9707     9895     +188     
==========================================
+ Hits         8698     8882     +184     
- Misses       1009     1013       +4     
Files with missing lines Coverage Δ
src/analysis_and_optimization/Memory_patterns.ml 89.00% <100.00%> (+0.30%) ⬆️
src/frontend/Pretty_printing.ml 92.38% <100.00%> (+0.07%) ⬆️
src/stan_math_backend/Cpp.ml 89.30% <100.00%> (+0.08%) ⬆️
src/stan_math_backend/Lower_expr.ml 93.93% <100.00%> (+0.28%) ⬆️
src/stan_math_backend/Lower_functions.ml 96.83% <100.00%> (-0.08%) ⬇️
src/stan_math_backend/Lower_program.ml 99.19% <100.00%> (+<0.01%) ⬆️
src/stan_math_backend/Numbering.ml 100.00% <100.00%> (ø)
src/stan_math_signatures/Stan_math_signatures.ml 86.13% <100.00%> (+2.23%) ⬆️
src/frontend/Semantic_error.ml 95.31% <97.67%> (+0.47%) ⬆️
src/frontend/SignatureMismatch.ml 85.88% <90.90%> (+0.28%) ⬆️
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WardBrian WardBrian linked an issue Apr 22, 2025 that may be closed by this pull request
@WardBrian
Copy link
Member Author

Ok, I think this is pretty much ready on the compiler side. There are a few things that need attention in the codegen or underlying C++:

cc @SteveBronder

@WardBrian
Copy link
Member Author

As of stan-dev/math@80904889a2, this is now passing CI

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.

Add signatures for laplace Expose Laplace Approximation
1 participant