Skip to content

Conversation

devmotion
Copy link
Member

This PR addresses the problem with transition_save! for stochastic control flow mentioned in TuringLang/DynamicPPL.jl#105 (comment). It changes the default implementations for writing and appending to a container of transitions from setindex! and push! to BangBang.setindex!! and BangBang.push!! which widen the container or return a new immutable instance if needed. For consistency with these default implementations and to indicate that one has to return the (potentially new) container, I renamed transitions_save! to ``save!!(andtransitions_init` to just `transitions`).

I'm wondering, should we start with merging such breaking changes to a dev branch first? I assume that, e.g., solving or addressing #31 will also require some changes of the interface, and hence maybe it would make sense to gather multiple breaking changes before merging them into master and releasing them?

@codecov
Copy link

codecov bot commented May 6, 2020

Codecov Report

Merging #35 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
- Coverage   97.45%   97.43%   -0.03%     
==========================================
  Files           5        5              
  Lines         118      117       -1     
==========================================
- Hits          115      114       -1     
  Misses          3        3              
Impacted Files Coverage Δ
src/AbstractMCMC.jl 100.00% <ø> (ø)
src/interface.jl 90.90% <100.00%> (-1.40%) ⬇️
src/sample.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c92a866...5c98582. Read the comment docs.

@cpfiffer
Copy link
Member

cpfiffer commented May 7, 2020

I think we're fine to go into master in this repo, since AbstractMCMC doesn't change much and isn't very prone to bugs.

@mohamed82008
Copy link
Contributor

Is this good to go?

@cpfiffer cpfiffer merged commit bd41004 into master May 16, 2020
@delete-merged-branch delete-merged-branch bot deleted the bangbang branch May 16, 2020 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants