-
Notifications
You must be signed in to change notification settings - Fork 9
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
static_parameter expr #175
Conversation
@penelopeysm @willtebbutt, can you help review this PR? The failing Turing integration tests are due to Mooncake, so they can be ignored. |
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.
This LGTM. You'll need to bump the version number before merging though so that we can tag a release.
Yes, it does fix the examples in #174! To be precise, the first one still gives an error, but it now gives another error that isn't due to Libtape (it's a meaningless model after all). |
@KDr2 I think this might be useful in writing a test 😄 it fails on master and runs correct on this PR.
I'm still trying to work out the RandomMeasures example. Will update if I get it. |
Thanks, do you have any clue about how to reproduce the second one with a simple function (not a Turing model)? |
Haha, sorry, I just edited the comment (probably after you saw it) to say that I hadn't worked that one out yet. I'm looking at it now! Thank you for looking into this so quickly!! |
@KDr2 I think it's the using Libtask
function g(::Type{T}) where {T}
a = zeros(T, 10)
end
tf = Libtask.TapedFunction(g, Float64)
#= on master
┌ Error: Unknown Expression:
│ typeof(var) = Core.SSAValue
│ var = :(%1)
│ typeof(line) = Expr
│ line = :($(Expr(:static_parameter, 1)))
└ @ Libtask ~/.julia/packages/Libtask/0vMZ5/src/tapedfunction.jl:443
=# |
using Libtask
function g(::Type{T}) where {T}
a = zeros(T, 10)
end
tf = Libtask.TapedFunction(g, Float64) The above seems fine, but then subsequently calling |
Fixed, but what happened to the Integeration test? It passes now... |
It's probably because of Hong's commit which bumped the minor version, and Turing.jl's compat entry for Libtask doesn't allow it to be tested with this. I'm curious as to whether we can keep 1.7 compat here, if you don't mind, I'll test it out :) |
We can keep both 1.7 and 1.10 in the CI unit tests. |
Thank you again to all of you who contributed here ❤️ |
Fix #174