Skip to content

Conversation

@penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Dec 9, 2025

Closes #2607. Note that this requires TuringLang/DynamicPPL.jl#1171 to go through first. Hence I can't add a test. But once the DPPL one is done, I will add the following test, which works locally: Test added

julia> using Turing

julia> @model function f()
           x ~ Normal()
           return x + 1
       end
f (generic function with 2 methods)

julia> mapp = maximum_a_posteriori(f())
ModeResult with maximized lp of -0.92
[0.0]

julia> returned(f(), mapp)
1.0

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Turing.jl documentation for PR #2736 is available at:
https://TuringLang.github.io/Turing.jl/previews/PR2736/

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.34%. Comparing base (8b84230) to head (b657805).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/optimisation/Optimisation.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2736   +/-   ##
=======================================
  Coverage   55.34%   55.34%           
=======================================
  Files          20       20           
  Lines        1254     1254           
=======================================
  Hits          694      694           
  Misses        560      560           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@penelopeysm penelopeysm requested a review from sunxd3 December 10, 2025 01:06
Copy link
Member

@sunxd3 sunxd3 left a comment

Choose a reason for hiding this comment

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

looks good in current state, will take another look once DPPL PR goes through

@penelopeysm penelopeysm requested a review from sunxd3 December 11, 2025 22:17
@penelopeysm
Copy link
Member Author

@sunxd3 dppl pr went through :)

@sunxd3
Copy link
Member

sunxd3 commented Jan 5, 2026

thanks, taking a look shortly

DistributionsAD = "0.6"
DocStringExtensions = "0.8, 0.9"
DynamicHMC = "3.4"
DynamicPPL = "0.39.1"
Copy link
Member

Choose a reason for hiding this comment

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

bump this too?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking it's not really necessary to bump, since technically using the old version is still fine, you just don't get this functionality

Copy link
Member

@sunxd3 sunxd3 left a comment

Choose a reason for hiding this comment

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

LGTM

@penelopeysm penelopeysm merged commit fc11409 into main Jan 5, 2026
22 of 29 checks passed
@penelopeysm penelopeysm deleted the py/initfrommle-fallback branch January 5, 2026 18:50
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.

create returned() method for results from mode estimation

3 participants