bat / BAT.jl

A Bayesian Analysis Toolkit in Julia
Other
198 stars 30 forks source link

WIP MCMC with transforms Interface #409

Closed waldie11 closed 3 months ago

waldie11 commented 1 year ago

FYI @oschulz @Cornelius-G

oschulz commented 1 year ago

Can you check the

Base.Meta.ParseError("parsing error in src/samplers/transformed_mcmc/struct_list.jl:34: missing comma or } in argument list")

CI error on Julia 1?

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -5.76% :warning:

Comparison is base (78e9339) 55.06% compared to head (9cb2625) 49.31%.

:exclamation: Current head 9cb2625 differs from pull request most recent head b6565c3. Consider uploading reports for the commit b6565c3 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #409 +/- ## ========================================== - Coverage 55.06% 49.31% -5.76% ========================================== Files 116 131 +15 Lines 5619 6323 +704 ========================================== + Hits 3094 3118 +24 - Misses 2525 3205 +680 ``` | [Files Changed](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat) | Coverage Δ | | |---|---|---| | [src/BAT.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL0JBVC5qbA==) | `100.00% <ø> (ø)` | | | [src/samplers/transformed\_mcmc/chain\_pool\_init.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL3NhbXBsZXJzL3RyYW5zZm9ybWVkX21jbWMvY2hhaW5fcG9vbF9pbml0Lmps) | `0.00% <0.00%> (ø)` | | | [src/samplers/transformed\_mcmc/mcmc\_algorithm.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL3NhbXBsZXJzL3RyYW5zZm9ybWVkX21jbWMvbWNtY19hbGdvcml0aG0uamw=) | `0.00% <0.00%> (ø)` | | | [src/samplers/transformed\_mcmc/mcmc\_convergence.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL3NhbXBsZXJzL3RyYW5zZm9ybWVkX21jbWMvbWNtY19jb252ZXJnZW5jZS5qbA==) | `0.00% <0.00%> (ø)` | | | [src/samplers/transformed\_mcmc/mcmc\_iterate.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL3NhbXBsZXJzL3RyYW5zZm9ybWVkX21jbWMvbWNtY19pdGVyYXRlLmps) | `0.00% <0.00%> (ø)` | | | [src/samplers/transformed\_mcmc/mcmc\_sample.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL3NhbXBsZXJzL3RyYW5zZm9ybWVkX21jbWMvbWNtY19zYW1wbGUuamw=) | `0.00% <0.00%> (ø)` | | | [src/samplers/transformed\_mcmc/mcmc\_sampleid.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL3NhbXBsZXJzL3RyYW5zZm9ybWVkX21jbWMvbWNtY19zYW1wbGVpZC5qbA==) | `0.00% <0.00%> (ø)` | | | [src/samplers/transformed\_mcmc/mcmc\_stats.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL3NhbXBsZXJzL3RyYW5zZm9ybWVkX21jbWMvbWNtY19zdGF0cy5qbA==) | `0.00% <0.00%> (ø)` | | | [...rs/transformed\_mcmc/mcmc\_tuning/mcmc\_noop\_tuner.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL3NhbXBsZXJzL3RyYW5zZm9ybWVkX21jbWMvbWNtY190dW5pbmcvbWNtY19ub29wX3R1bmVyLmps) | `0.00% <0.00%> (ø)` | | | [...sformed\_mcmc/mcmc\_tuning/mcmc\_proposalcov\_tuner.jl](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat#diff-c3JjL3NhbXBsZXJzL3RyYW5zZm9ybWVkX21jbWMvbWNtY190dW5pbmcvbWNtY19wcm9wb3NhbGNvdl90dW5lci5qbA==) | `0.00% <0.00%> (ø)` | | | ... and [7 more](https://app.codecov.io/gh/bat/BAT.jl/pull/409?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat) | | ... and [64 files with indirect coverage changes](https://app.codecov.io/gh/bat/BAT.jl/pull/409/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bat)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

oschulz commented 1 year ago

I've updated this to use the new BATContext. "transformed_example.jl" doesn't fully run through, but I'm not sure if that's related.

oschulz commented 1 year ago

TransformedAdaptiveMHTuning in the example works now, but

r_hmc = @time BAT.bat_sample_impl(posterior, MCMCSampling(mcalg=HamiltonianMC(), nchains=4, nsteps=4*20000), context)

in the example doesn't work yet, but that's to be expected currently, right?

I think BATContext-wise this is fine now.

Cornelius-G commented 1 year ago

TransformedAdaptiveMHTuning in the example works now, but

r_hmc = @time BAT.bat_sample_impl(posterior, MCMCSampling(mcalg=HamiltonianMC(), nchains=4, nsteps=4*20000), context)

in the example doesn't work yet, but that's to be expected currently, right?

Hm, for me this line works. As it should, because that is just the "good old" HMC smapling, not using the new transformations.

oschulz commented 1 year ago

Ah - well, in any case, I think the adaption to BATContext is complete.

oschulz commented 3 months ago

@Micki-D needs to be updated to API changes.

oschulz commented 3 months ago

Closing in favor of #441