Skip to content
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

Expose builtin constraints #1494

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

WardBrian
Copy link
Member

Closes #1436

This needs some math work before merging, at the very least stan-dev/math#3151

Submission Checklist

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

Release notes

All the built-in constraint types now have corresponding _jacobian, _constrain, and _unconstrain functions. The first two functions are identical except for the _jacobian version will increment the target with the necessary change of variables adjustment.

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)

Copy link

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.56%. Comparing base (c397822) to head (e68e038).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1494      +/-   ##
==========================================
+ Coverage   90.46%   90.56%   +0.09%     
==========================================
  Files          66       66              
  Lines       10712    10809      +97     
==========================================
+ Hits         9691     9789      +98     
+ Misses       1021     1020       -1     
Files with missing lines Coverage Δ
src/frontend/Typechecker.ml 93.10% <100.00%> (+0.03%) ⬆️
src/middle/Stan_math_signatures.ml 98.24% <100.00%> (+0.13%) ⬆️
src/stan_math_backend/Lower_expr.ml 93.65% <100.00%> (+0.08%) ⬆️

... and 1 file with indirect coverage changes

🚀 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

The expression test failures are kind of weird but they seem to be fixed by stan-dev/math#3147 so there might just be some known bug in offset_multipliers code (cc @SteveBronder)

@WardBrian WardBrian marked this pull request as ready for review March 7, 2025 21:45
@WardBrian WardBrian requested a review from SteveBronder March 10, 2025 16:53
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.

Expose built-in constraint transforms as _jacobian functions
1 participant