Skip to content

Conversation

@WardBrian
Copy link
Member

For stan-dev/math#3250

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:

Release notes

Updated laplace _tol versions to accept control parameters as a tuple rather than a long list of trailing arguments.

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)

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

❌ Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.50%. Comparing base (1842854) to head (1ac6abd).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/frontend/Semantic_error.ml 86.66% 2 Missing ⚠️
src/frontend/Typechecker.ml 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1586      +/-   ##
==========================================
+ Coverage   90.49%   90.50%   +0.01%     
==========================================
  Files          65       65              
  Lines        9985     9997      +12     
==========================================
+ Hits         9036     9048      +12     
  Misses        949      949              
Files with missing lines Coverage Δ
src/stan_math_signatures/Stan_math_signatures.ml 86.13% <100.00%> (+1.37%) ⬆️
src/frontend/Typechecker.ml 93.38% <91.66%> (-0.05%) ⬇️
src/frontend/Semantic_error.ml 95.72% <86.66%> (-0.25%) ⬇️
🚀 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
Copy link
Member Author

@SteveBronder the codegen here is triggering those static asserts in the new laplace code:

stan/lib/stan_math/stan/math/mix/functor/laplace_marginal_density_estimator.hpp:129:7: error: static_assert failed "ERROR:(laplace_marginal_lpdf) The third laplace argument is expected to be an int representing the maximum number of steps."
      static_assert(
      ^
stan/lib/stan_math/stan/math/mix/functor/laplace_marginal_density_estimator.hpp:135:7: error: static_assert failed "ERROR:(laplace_marginal_lpdf) The fourth laplace argument is expected to be an int representing the solver."
      static_assert(
      ^
stan/lib/stan_math/stan/math/mix/functor/laplace_marginal_density_estimator.hpp:141:7: error: static_assert failed "ERROR:(laplace_marginal_lpdf) The fifth laplace argument is expected to be an int representing the hessian block size."
      static_assert(
      ^
stan/lib/stan_math/stan/math/mix/functor/laplace_marginal_density_estimator.hpp:147:7: error: static_assert failed "ERROR:(laplace_marginal_lpdf) The sixth laplace argument is expected to be an int representing the max steps line search."
      static_assert(
      ^
stan/lib/stan_math/stan/math/mix/functor/laplace_marginal_density_estimator.hpp:156:7: error: static_assert failed "ERROR:(laplace_marginal_lpdf) The seventh laplace argument is expected to be an int representing allow fallthrough (0/1)."

I think that the code there just needs to be okay accepting references, since the tuple is created with forward_as_tuple

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