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

add indirection for update step, add projection for LocationScale #65

Merged
merged 4 commits into from
Jun 13, 2024

Conversation

Red-Portal
Copy link
Member

This PR adds a wrapper around Optimisers.update! so that we one can add additional post or pre-hoc operations. For instance, for LocationScale distributions, it is better to ensure that the diagonal of the scale matrix is always positive. This can be done by adding a projection after the call to Optimisers.update!.

@Red-Portal Red-Portal requested a review from torfjelde June 7, 2024 00:31
@Red-Portal
Copy link
Member Author

Red-Portal commented Jun 7, 2024

@torfjelde Any potential concerns/comments on this?

@Red-Portal
Copy link
Member Author

@torfjelde Could you take a look when you have time?

Copy link
Member

@torfjelde torfjelde left a comment

Choose a reason for hiding this comment

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

Added a few comments:)

But worth noting that I'm very much out-of-the-loop with the current design so it's difficult for me to give good feedback beyond just the delta of the PR 😕

src/families/location_scale.jl Show resolved Hide resolved
src/families/location_scale.jl Show resolved Hide resolved
src/families/location_scale.jl Outdated Show resolved Hide resolved
@Red-Portal
Copy link
Member Author

@torfjelde Thanks for the review! Yeah, comments on the deltas would be much appreciated, especially when they're design-related.

Copy link

codecov bot commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.33%. Comparing base (dbdb13e) to head (538bafe).
Report is 14 commits behind head on master.

Current head 538bafe differs from pull request most recent head b2b09bb

Please upload reports for the commit b2b09bb to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
+ Coverage   91.93%   93.33%   +1.39%     
==========================================
  Files          11       11              
  Lines         186      195       +9     
==========================================
+ Hits          171      182      +11     
+ Misses         15       13       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Red-Portal Red-Portal merged commit 5ced9c2 into TuringLang:master Jun 13, 2024
7 of 9 checks passed
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.

2 participants