-
Notifications
You must be signed in to change notification settings - Fork 32
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
Don't include lhs of := in results of predict() #766
Conversation
bc74e8c
to
a8922bd
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #766 +/- ##
==========================================
+ Coverage 86.05% 86.12% +0.06%
==========================================
Files 36 36
Lines 4325 4324 -1
==========================================
+ Hits 3722 3724 +2
+ Misses 603 600 -3 ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 12598010488Details
💛 - Coveralls |
f9dc618
to
2fcb0c6
Compare
e41a392
to
dea62bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very sensible, thanks!
Didn't see this as I was on vacation, but if this had been done as a kwarg with default to |
Closes #765
Specifically,
lhs := rhs
expressions are treated here:DynamicPPL.jl/src/compiler.jl
Lines 379 to 389 in 6657441
This in turn checks for
is_extracting_values(context)
:DynamicPPL.jl/src/compiler.jl
Lines 394 to 404 in 6657441
Currently, this function only returns true for ValuesAsInModelContext, and returns false for every other context.
DynamicPPL.jl/src/values_as_in_model.jl
Lines 40 to 45 in 6657441
This PR adds a new boolean field to
ValuesAsInModelContext
which controls whetheris_extracting_values(context)
is true. Forpredict
, this field is set to false, so thatlhs := rhs
lines are not included in the resulting chain.Instead of providing a default value, I've opted to force callers of
values_as_in_model
specify whether they want the:=
variables, so this is a minor release.