-
Notifications
You must be signed in to change notification settings - Fork 18
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
Formatting all files #80
Conversation
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
JuliaFormatter
[JuliaFormatter] reported by reviewdog 🐶
RepGradELBO(n_montecarlo; entropy=StickingTheLandingEntropy()), |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/inference/repgradelbo_locationscale_bijectors.jl
Lines 56 to 58 in b2c7fa0
optimizer=opt, | |
show_progress=PROGRESS, | |
adtype=adtype, |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/inference/repgradelbo_locationscale_bijectors.jl
Lines 78 to 80 in b2c7fa0
optimizer=opt, | |
show_progress=PROGRESS, | |
adtype=adtype, |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/inference/repgradelbo_locationscale_bijectors.jl
Lines 92 to 94 in b2c7fa0
optimizer=opt, | |
show_progress=PROGRESS, | |
adtype=adtype, |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/location_scale.jl
Lines 65 to 69 in b2c7fa0
@test dropdims(mean(z_samples; dims=2); dims=2) ≈ μ rtol = realtype(1e-2) | |
@test dropdims(var(z_samples; dims=2); dims=2) ≈ diag(Σ) rtol = realtype( | |
1e-2 | |
) | |
@test cov(z_samples; dims=2) ≈ Σ rtol = realtype(1e-2) |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/location_scale.jl
Lines 78 to 82 in b2c7fa0
@test dropdims(mean(z_samples; dims=2); dims=2) ≈ μ rtol = realtype(1e-2) | |
@test dropdims(var(z_samples; dims=2); dims=2) ≈ diag(Σ) rtol = realtype( | |
1e-2 | |
) | |
@test cov(z_samples; dims=2) ≈ Σ rtol = realtype(1e-2) |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/location_scale.jl
Lines 97 to 101 in b2c7fa0
@test dropdims(mean(z_samples; dims=2); dims=2) ≈ μ rtol = realtype(1e-2) | |
@test dropdims(var(z_samples; dims=2); dims=2) ≈ diag(Σ) rtol = realtype( | |
1e-2 | |
) | |
@test cov(z_samples; dims=2) ≈ Σ rtol = realtype(1e-2) |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/location_scale.jl
Lines 115 to 119 in b2c7fa0
@test dropdims(mean(z_samples; dims=2); dims=2) ≈ μ rtol = realtype(1e-2) | |
@test dropdims(var(z_samples; dims=2); dims=2) ≈ diag(Σ) rtol = realtype( | |
1e-2 | |
) | |
@test cov(z_samples; dims=2) ≈ Σ rtol = realtype(1e-2) |
[JuliaFormatter] reported by reviewdog 🐶
FullRankGaussian(μ, L; scale_eps=ϵ) |
[JuliaFormatter] reported by reviewdog 🐶
MeanFieldGaussian(μ, L; scale_eps=ϵ) |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/optimize.jl
Lines 21 to 23 in b2c7fa0
q_ref, stats_ref, _ = optimize( | |
rng, model, obj, q0, T; optimizer, show_progress=false, adtype | |
) |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/optimize.jl
Line 26 in b2c7fa0
optimize(model, obj, q0, T; optimizer, show_progress=false, adtype) |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/optimize.jl
Line 33 in b2c7fa0
callback(; stat, args...) = (test_value=test_values[stat.iteration],) |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/optimize.jl
Lines 36 to 38 in b2c7fa0
_, stats, _ = optimize( | |
rng, model, obj, q0, T; show_progress=false, adtype, callback | |
) |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/optimize.jl
Lines 48 to 50 in b2c7fa0
q_first, _, state = optimize( | |
rng, model, obj, q0, T_first; optimizer, show_progress=false, adtype | |
) |
[JuliaFormatter] reported by reviewdog 🐶
AdvancedVI.jl/test/interface/optimize.jl
Lines 59 to 60 in b2c7fa0
show_progress=false, | |
state_init=state, |
[JuliaFormatter] reported by reviewdog 🐶
elbo_ref = estimate_objective(rng, obj, q0, model; n_samples=10^4) |
[JuliaFormatter] reported by reviewdog 🐶
elbo = estimate_objective(rng, obj, q0, model; n_samples=10^4) |
[JuliaFormatter] reported by reviewdog 🐶
elbo = estimate_objective(obj, q0, model; n_samples=10^4) |
[JuliaFormatter] reported by reviewdog 🐶
ADTypes.AutoForwardDiff(), ADTypes.AutoReverseDiff(), ADTypes.AutoZygote() |
[JuliaFormatter] reported by reviewdog 🐶
Vector{eltype(μ_true)}(μ_true), Diagonal(Vector{eltype(L_true)}(diag(L_true))) |
[JuliaFormatter] reported by reviewdog 🐶
obj = RepGradELBO(10; entropy=StickingTheLandingEntropy()) |
[JuliaFormatter] reported by reviewdog 🐶
ad, AdvancedVI.estimate_repgradelbo_ad_forward, params, aux, out |
[JuliaFormatter] reported by reviewdog 🐶
[1:1, 2:(1 + length(μ_y))], |
[JuliaFormatter] reported by reviewdog 🐶
μ[1], L[1, 1], μ[2:end], PDMat(Σ[2:end, 2:end], Cholesky(L[2:end, 2:end], 'L', 0)) |
location::AbstractVector{T}, | ||
scale::AbstractMatrix{T}, | ||
dist::ContinuousDistribution; | ||
scale_eps::T=sqrt(eps(T)), |
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.
[JuliaFormatter] reported by reviewdog 🐶
scale_eps::T=sqrt(eps(T)), | |
scale_eps::T = sqrt(eps(T)), |
end | ||
|
||
function Distributions.rand( | ||
rng::AbstractRNG, q::MvLocationScale{S, D, L}, num_samples::Int | ||
) where {S, D, L} | ||
rng::AbstractRNG, q::MvLocationScale{S,D,L}, num_samples::Int |
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.
[JuliaFormatter] reported by reviewdog 🐶
rng::AbstractRNG, q::MvLocationScale{S,D,L}, num_samples::Int | |
rng::AbstractRNG, | |
q::MvLocationScale{S,D,L}, | |
num_samples::Int, |
end | ||
|
||
# This specialization improves AD performance of the sampling path | ||
function Distributions.rand( | ||
rng::AbstractRNG, q::MvLocationScale{<:Diagonal, D, L}, num_samples::Int | ||
) where {L, D} | ||
rng::AbstractRNG, q::MvLocationScale{<:Diagonal,D,L}, num_samples::Int |
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.
[JuliaFormatter] reported by reviewdog 🐶
rng::AbstractRNG, q::MvLocationScale{<:Diagonal,D,L}, num_samples::Int | |
rng::AbstractRNG, | |
q::MvLocationScale{<:Diagonal,D,L}, | |
num_samples::Int, |
end | ||
|
||
function Distributions._rand!(rng::AbstractRNG, q::MvLocationScale, x::AbstractVecOrMat{<:Real}) | ||
function Distributions._rand!( | ||
rng::AbstractRNG, q::MvLocationScale, x::AbstractVecOrMat{<:Real} |
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.
[JuliaFormatter] reported by reviewdog 🐶
rng::AbstractRNG, q::MvLocationScale, x::AbstractVecOrMat{<:Real} | |
rng::AbstractRNG, | |
q::MvLocationScale, | |
x::AbstractVecOrMat{<:Real}, |
L::LinearAlgebra.AbstractTriangular{T}; | ||
scale_eps::T = sqrt(eps(T)) | ||
) where {T <: Real} | ||
μ::AbstractVector{T}, L::LinearAlgebra.AbstractTriangular{T}; scale_eps::T=sqrt(eps(T)) |
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.
[JuliaFormatter] reported by reviewdog 🐶
μ::AbstractVector{T}, L::LinearAlgebra.AbstractTriangular{T}; scale_eps::T=sqrt(eps(T)) | |
μ::AbstractVector{T}, | |
L::LinearAlgebra.AbstractTriangular{T}; | |
scale_eps::T = sqrt(eps(T)), |
optimizer=opt, | ||
show_progress=PROGRESS, | ||
adtype=adtype, |
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.
[JuliaFormatter] reported by reviewdog 🐶
optimizer=opt, | |
show_progress=PROGRESS, | |
adtype=adtype, | |
optimizer = opt, | |
show_progress = PROGRESS, | |
adtype = adtype, |
:RepGradELBOStickingTheLanding => RepGradELBO(n_montecarlo, entropy = StickingTheLandingEntropy()), | ||
:RepGradELBOClosedFormEntropy => RepGradELBO(n_montecarlo), | ||
:RepGradELBOStickingTheLanding => | ||
RepGradELBO(n_montecarlo; entropy=StickingTheLandingEntropy()), |
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.
[JuliaFormatter] reported by reviewdog 🐶
RepGradELBO(n_montecarlo; entropy=StickingTheLandingEntropy()), | |
RepGradELBO(n_montecarlo; entropy = StickingTheLandingEntropy()), |
optimizer=opt, | ||
show_progress=PROGRESS, | ||
adtype=adtype, |
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.
[JuliaFormatter] reported by reviewdog 🐶
optimizer=opt, | |
show_progress=PROGRESS, | |
adtype=adtype, | |
optimizer = opt, | |
show_progress = PROGRESS, | |
adtype = adtype, |
optimizer=opt, | ||
show_progress=PROGRESS, | ||
adtype=adtype, |
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.
[JuliaFormatter] reported by reviewdog 🐶
optimizer=opt, | |
show_progress=PROGRESS, | |
adtype=adtype, | |
optimizer = opt, | |
show_progress = PROGRESS, | |
adtype = adtype, |
optimizer=opt, | ||
show_progress=PROGRESS, | ||
adtype=adtype, |
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.
[JuliaFormatter] reported by reviewdog 🐶
optimizer=opt, | |
show_progress=PROGRESS, | |
adtype=adtype, | |
optimizer = opt, | |
show_progress = PROGRESS, | |
adtype = adtype, |
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.
No description provided.