Skip to content

Commit b4e9ca7

Browse files
authored
Merge pull request #438 from ReactiveBayes/rxinfer-update-with-refactor-cvi-projection
test(fix): no marginalsamples option anymore
2 parents 5d55c53 + 81ea4ce commit b4e9ca7

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RxInfer"
22
uuid = "86711068-29c9-4ff7-b620-ae75d7495b3d"
33
authors = ["Bagaev Dmitry <d.v.bagaev@tue.nl> and contributors"]
4-
version = "4.1.0"
4+
version = "4.2.0"
55

66
[deps]
77
BayesBase = "b4ee3484-f114-42fe-b91c-797d54a0c67e"
@@ -56,7 +56,7 @@ Preferences = "1.4.3"
5656
PrettyTables = "2"
5757
ProgressMeter = "1.0.0"
5858
Random = "1.9"
59-
ReactiveMP = "~5.1.0"
59+
ReactiveMP = "~5.2.0"
6060
Reexport = "1.2.0"
6161
Rocket = "1.8.0"
6262
Static = "0.8.10, 1"

codemeta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
"downloadUrl": "https://github.com/reactivebayes/RxInfer.jl/releases",
1010
"issueTracker": "https://github.com/reactivebayes/RxInfer.jl/issues",
1111
"name": "RxInfer.jl",
12-
"version": "4.1.0",
12+
"version": "4.2.0",
1313
"description": "Julia package for automated, scalable and efficient Bayesian inference on factor graphs with reactive message passing. ",
1414
"applicationCategory": "Statistics",
1515
"developmentStatus": "active",
1616
"readme": "https://rxinfer.ml",
17-
"softwareVersion": "4.1.0",
17+
"softwareVersion": "4.2.0",
1818
"keywords": [
1919
"Bayesian inference",
2020
"message passing",

test/ext/ProjectionExt/inference_with_projection_tests.jl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,15 @@ end
411411
model = mymodel(C = C), data = (y = y,), meta = mymeta(), constraints = myconstraints(), initialization = myinitialization(), free_energy = true, iterations = 40
412412
)
413413

414-
@test mean(result.posteriors[:a][end]) a atol = 3e-2
415-
@test foo(mean(result.posteriors[:a][end]), mean(result.posteriors[:b][end])) foo(a, b) atol = 3e-2
416-
@test mean(result.posteriors[][end]) foo(a, b) atol = 3e-2
414+
conf_bound_a = 3 * std(result.posteriors[:a][end])
415+
@test mean(result.posteriors[:a][end]) - conf_bound_a < a < mean(result.posteriors[:a][end]) + conf_bound_a
416+
417+
conf_bound_b = 3 * std(result.posteriors[:b][end])
418+
@test mean(result.posteriors[:b][end]) - conf_bound_b < b < mean(result.posteriors[:b][end]) + conf_bound_b
419+
420+
@test mean(result.posteriors[:a][end]) a atol = 1e-2
421+
@test foo(mean(result.posteriors[:a][end]), mean(result.posteriors[:b][end])) foo(a, b) atol = 1e-2
422+
@test mean(result.posteriors[][end]) foo(a, b) atol = 2e-2
417423
@test first(result.free_energy) > last(result.free_energy)
418424
@test count(<(0), diff(result.free_energy)) > 0.95
419425

@@ -469,7 +475,7 @@ end
469475
end
470476

471477
@meta function mymeta()
472-
foo() -> CVIProjection(rng = StableRNG(42), marginalsamples = 20, outsamples = 5)
478+
foo() -> CVIProjection(rng = StableRNG(42), sampling_strategy = FullSampling(10), outsamples = 5)
473479
end
474480

475481
result = infer(

0 commit comments

Comments
 (0)