Skip to content

Commit d754821

Browse files
committed
remove n_site from gen_hybridproblem_synthetic
1 parent 7cd7c9e commit d754821

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

dev/doubleMM.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ cdev = gdev isa MLDataDevices.AbstractGPUDevice ? cpu_device() : identity
2929

3030
#------ setup synthetic data and training data loader
3131
prob0_ = HybridProblem(DoubleMM.DoubleMMCase(); scenario);
32-
(; xM, n_site, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o, y_unc
33-
) = gen_hybridproblem_synthetic(rng, prob0_; scenario);
32+
(; xM, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o, y_unc
33+
) = gen_hybridproblem_synthetic(rng, DoubleMM.DoubleMMCase(); scenario);
3434
n_site, n_batch = get_hybridproblem_n_site_and_batch(prob0_; scenario)
3535
ζP_true, ζMs_true = log.(θP_true), log.(θMs_true)
3636
i_sites = 1:n_site

src/DoubleMM/f_doubleMM.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ function HVI.gen_hybridproblem_synthetic(rng::AbstractRNG, prob::DoubleMMCase;
253253
y_o = y_true .+ randn(rng, FloatType, size(y_true)) .* σ_o
254254
(;
255255
xM,
256-
n_site,
257256
θP_true = θP,
258257
θMs_true,
259258
xP,

test/test_HybridProblem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ construct_problem = (;scenario=(:default,)) -> begin
4949
# n_batch = 10
5050
n_site, n_batch = get_hybridproblem_n_site_and_batch(CP.DoubleMM.DoubleMMCase(); scenario)
5151
# dependency on DeoubleMMCase -> take care of changes in covariates
52-
(; xM, n_site, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o, y_unc
52+
(; xM, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o, y_unc
5353
) = gen_hybridproblem_synthetic(rng, DoubleMM.DoubleMMCase())
5454
n_covar = size(xM,1)
5555
n_input = (:covarK2 scenario) ? n_covar +1 : n_covar

test/test_doubleMM.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ par_templates = get_hybridproblem_par_templates(prob; scenario)
3636
end
3737

3838
rng = StableRNG(111) # make sure to be the same as when constructing train_dataloader
39-
(; xM, n_site, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o, y_unc
39+
(; xM, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o, y_unc
4040
) = gen_hybridproblem_synthetic(rng, prob; scenario);
41+
n_site, n_batch = get_hybridproblem_n_site_and_batch(prob; scenario)
4142
i_sites = 1:n_site
4243
fneglogden = get_hybridproblem_neg_logden_obs(prob; scenario)
4344

test/test_elbo.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test_scenario = (scenario) -> begin
3838
#θsite_true = get_hybridproblem_par_templates(prob; scenario)
3939
n_covar = 5
4040
n_site, n_batch = get_hybridproblem_n_site_and_batch(prob; scenario)
41-
(; xM, n_site, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o, y_unc
41+
(; xM, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o, y_unc
4242
) = gen_hybridproblem_synthetic(rng, prob; scenario);
4343

4444
g, ϕg0 = get_hybridproblem_MLapplicator(prob; scenario);

test/test_sample_zeta.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ scenario = (:default,)
2323

2424
n_θM, n_θP = length.(values(get_hybridproblem_par_templates(prob; scenario)))
2525

26-
(; xM, n_site, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o
26+
(; xM, θP_true, θMs_true, xP, y_global_true, y_true, y_global_o, y_o
2727
) = gen_hybridproblem_synthetic(rng, prob; scenario)
2828

2929
FT = get_hybridproblem_float_type(prob; scenario)

0 commit comments

Comments
 (0)