-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move most of test_utils into TestExt
- Loading branch information
1 parent
5bc980a
commit 124996e
Showing
6 changed files
with
65 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module DynamicPPLTestExt | ||
|
||
using DynamicPPL | ||
using AbstractMCMC | ||
using Test | ||
|
||
include("DynamicPPLTestExt/contexts.jl") | ||
include("DynamicPPLTestExt/varinfo.jl") | ||
include("DynamicPPLTestExt/sampler.jl") | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,37 @@ | ||
module TestUtils | ||
|
||
using AbstractMCMC | ||
using DynamicPPL | ||
using LinearAlgebra | ||
using Distributions | ||
using Test | ||
|
||
using Random: Random | ||
using Bijectors: Bijectors | ||
using Accessors: Accessors | ||
|
||
# For backwards compat. | ||
using DynamicPPL: varname_leaves, update_values!! | ||
|
||
include("test_utils/model_interface.jl") | ||
include("test_utils/models.jl") | ||
include("test_utils/contexts.jl") | ||
include("test_utils/varinfo.jl") | ||
include("test_utils/sampler.jl") | ||
|
||
|
||
############################################################## | ||
# The remainder of this file contains skeleton implementations for | ||
# DynamicPPLTestExt | ||
############################################################## | ||
|
||
function test_context_interface end | ||
|
||
""" | ||
Context that multiplies each log-prior by mod | ||
used to test whether varwise_logpriors respects child-context. | ||
""" | ||
struct TestLogModifyingChildContext{T,Ctx} <: DynamicPPL.AbstractContext | ||
mod::T | ||
context::Ctx | ||
end | ||
|
||
function marginal_mean_of_samples end | ||
function test_sampler end | ||
function test_sampler_on_demo_models end | ||
function test_sampler_continuous end | ||
function test_values end | ||
function setup_varinfos end | ||
|
||
end |