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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.51%. Comparing base (4dc7ad0) to head (041d7c8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2736   +/-   ##
=======================================
  Coverage   86.51%   86.51%           
=======================================
  Files          20       20           
  Lines        1261     1261           
=======================================
  Hits         1091     1091           
  Misses        170      170           

☔ 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
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