Skip to content

Make sampling, integration and mode-estimation also return an EvaluatedMeasure #1020

Make sampling, integration and mode-estimation also return an EvaluatedMeasure

Make sampling, integration and mode-estimation also return an EvaluatedMeasure #1020

Triggered via pull request November 4, 2024 14:01
@oschulzoschulz
synchronize #459
gen-em
Status Failure
Total duration 15m 13s
Artifacts

ci.yml

on: pull_request
Documentation
6m 0s
Documentation
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

8 errors
Documentation: ../../../.julia/packages/Documenter/C1XEF/src/utilities/utilities.jl#L44
failed to run `@example` block in src/tutorial.md:377-386 ```@example tutorial using Optim findmode_result = bat_findmode( posterior, OptimAlg(optalg = Optim.NelderMead(), init = ExplicitInit([samples_mode])) ) fit_par_values = findmode_result.result ``` exception = MethodError: no method matching EvaluatedMeasure(::PosteriorMeasure{DensityInterface.LogFuncDensity{Main.__atexample__named__tutorial.var"#3#4"{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, Vector{Int64}, typeof(Main.__atexample__named__tutorial.fit_function)}}, BAT.BATDistMeasure{ValueShapes.NamedTupleDist{(:a, :mu, :sigma), Tuple{Distributions.Product{Distributions.Continuous, Distributions.Weibull{Float64}, Vector{Distributions.Weibull{Float64}}}, Distributions.Product{Distributions.Continuous, Distributions.Uniform{Float64}, Vector{Distributions.Uniform{Float64}}}, Distributions.Weibull{Float64}}, Tuple{ValueShapes.ValueAccessor{ValueShapes.ArrayShape{Real, 1}}, ValueShapes.ValueAccessor{ValueShapes.ArrayShape{Real, 1}}, ValueShapes.ValueAccessor{ValueShapes.ScalarShape{Real}}}, NamedTuple}}}, ::Missing, ::Missing, ::MeasureBase.UnknownMass, ::Vector{@NamedTuple{a::SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}, mu::SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}, sigma::Float64}}, ::Missing) The type `EvaluatedMeasure` exists, but no method is defined for this combination of argument types when trying to construct it. Closest candidates are: EvaluatedMeasure(::D, ::S, ::A, ::M, !Matched::P, ::G) where {D<:BAT.BATMeasure, S<:Union{Missing, StructArrays.StructArray{DensitySample{P, T, W, R, Q}, 1, @NamedTuple{v::PV, logd::TV, weight::WV, info::RV, aux::QV}} where {P, T<:AbstractFloat, W<:Real, R, Q, PV<:AbstractVector{P}, TV<:AbstractVector{T}, WV<:AbstractVector{W}, RV<:AbstractVector{R}, QV<:AbstractVector{Q}}}, A<:Union{Missing, BAT.BATMeasure}, M<:Number, P<:Union{Missing, StructArrays.StructArray{DensitySample{P, T, W, R, Q}, 1, @NamedTuple{v::PV, logd::TV, weight::WV, info::RV, aux::QV}} where {P, T<:AbstractFloat, W<:Real, R, Q, PV<:AbstractVector{P}, TV<:AbstractVector{T}, WV<:AbstractVector{W}, RV<:AbstractVector{R}, QV<:AbstractVector{Q}}}, G<:Union{Missing, AbstractSampleGenerator}} @ BAT ~/work/BAT.jl/BAT.jl/src/samplers/evaluated_measure.jl:43 EvaluatedMeasure(::Union{MeasureBase.AbstractMeasure, Distributions.Distribution, StructArrays.StructArray{DensitySample{P, T, W, R, Q}, 1, @NamedTuple{v::PV, logd::TV, weight::WV, info::RV, aux::QV}} where {P, T<:AbstractFloat, W<:Real, R, Q, PV<:AbstractVector{P}, TV<:AbstractVector{T}, WV<:AbstractVector{W}, RV<:AbstractVector{R}, QV<:AbstractVector{Q}}}; samples, approx, mass, modes, _generator) @ BAT ~/work/BAT.jl/BAT.jl/src/samplers/evaluated_measure.jl:52 EvaluatedMeasure(!Matched::EvaluatedMeasure; samples, approx, mass, modes, _generator) @ BAT ~/work/BAT.jl/BAT.jl/src/samplers/evaluated_measure.jl:65 Stacktrace: [1] _augment_bat_retval(::Val{:mode}, measure::PosteriorMeasure{DensityInterface.LogFuncDensity{Main.__atexample__named__tutorial.var"#3#4"{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, Vector{Int64}, typeof(Main.__atexample__named__tutorial.fit_function)}}, BAT.BATDistMeasure{ValueShapes.NamedTupleDist{(:a, :mu, :sigma), Tuple{Distributions.Product{Distributions.Continuous, Distributions.Weibull{Float64}, Vector{Distributions.Weibull{Float64}}}, Distributions.Product{Distributions.Continuous, Distributions.Uniform{Float64}, Vector{Distributions.Uniform{Float64}}}, Distributions.Weibull{Float64}}, Tuple{ValueShapes.ValueAccessor{ValueShapes.ArrayShape{Real, 1}}, ValueShapes.ValueAccessor{ValueShapes.ArrayShape{Real, 1}}, ValueShapes.ValueAccessor{ValueShapes.ScalarShape{Real}}}, NamedTuple}}}, r::@
Documentation
Process completed with exit code 1.
Julia 1.10 - ubuntu-latest - x64 - pull_request
Process completed with exit code 1.
Julia pre - ubuntu-latest - x64 - pull_request
Process completed with exit code 1.
Julia 1 - ubuntu-latest - x64 - pull_request
Process completed with exit code 1.
Julia 1 - ubuntu-latest - x86 - pull_request
Process completed with exit code 1.
Julia 1 - windows-latest - x64 - pull_request
Process completed with exit code 1.
Julia 1 - macOS-latest - x64 - pull_request
Process completed with exit code 1.