-
Notifications
You must be signed in to change notification settings - Fork 35
Add missing tovec
methods for NamedTuple
and Tuple
.
#939
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
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Benchmark Report for Commit 40fba7eComputer Information
Benchmark Results
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #939 +/- ##
=======================================
Coverage 82.91% 82.92%
=======================================
Files 36 36
Lines 3962 3964 +2
=======================================
+ Hits 3285 3287 +2
Misses 677 677 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Penny could you give it quick look? I didn't try hard to make the test good and fit well in. So welcome to correct and also absolutely okay to fix directly. |
Pull Request Test Coverage Report for Build 15248584238Details
💛 - Coveralls |
1 similar comment
Pull Request Test Coverage Report for Build 15248584238Details
💛 - Coveralls |
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.
There are still issues with Bijectors
using Turing
@model function f(x = [1.5, 2.0])
priors ~ product_distribution((m=Normal(), s=Beta(2, 2)))
x .~ Normal(priors.m, sqrt(priors.s))
return priors
end
sample(f(), NUTS(), 1000)
#=
ERROR: MethodError: no method matching bijector(::Distributions.ProductNamedTupleDistribution{(:m, :s), Tuple{Normal{…}, Beta{…}}, Continuous, Float64})
The function `bijector` exists, but no method is defined for this combination of argument types.
Closest candidates are:
bijector(::KSOneSided)
@ Bijectors ~/.julia/packages/Bijectors/L7xKL/src/transformed_distribution.jl:125
bijector(::Product{Continuous, T, Tdists} where {T<:Distribution{Univariate, Continuous}, Tdists<:(FillArrays.Fill{T, 1})})
@ BijectorsDistributionsADExt ~/.julia/packages/Bijectors/L7xKL/ext/BijectorsDistributionsADExt.jl:28
bijector(::Product{Discrete, T, V} where {T<:Distribution{Univariate, Discrete}, V<:AbstractVector{T}})
@ Bijectors ~/.julia/packages/Bijectors/L7xKL/src/transformed_distribution.jl:79
...
=#
but I think on the DynamicPPL side this looks fine.
I edited the first comment to not close the issue, just so that we can keep track of it :) |
#933