Skip to content

Conversation

@devmotion
Copy link
Member

@devmotion devmotion commented Jul 7, 2020

This is a quite rough and initial draft of how to update DynamicPPL + Turing to AbstractMCMC 2 (tests don't pass currently). The update requires some major changes since sample_init! and sample_end! were removed. Some changes might have to be reverted or moved to other PRs, while others might be missing.

@devmotion
Copy link
Member Author

I just rechecked, it seems most tests pass, mainly/only Gibbs is broken.

@devmotion
Copy link
Member Author

Gibbs works as well now, but I'm not satisfied with the current implementation and the DynamicPPL-specific interface for the steps. It seems a bit too complicated, and in particular Gibbs + HMC have some weird initial steps.

I won't be able to work on this for the next two weeks but it's in a working state now (apart from the PDMats error tests passed locally).

@devmotion
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Sep 8, 2020
@bors
Copy link
Contributor

bors bot commented Sep 8, 2020

try

Build failed:

@devmotion
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Sep 8, 2020
@bors
Copy link
Contributor

bors bot commented Sep 8, 2020

try

Build failed:

@devmotion
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Sep 8, 2020
@bors
Copy link
Contributor

bors bot commented Sep 8, 2020

try

Build failed:

@devmotion
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Sep 8, 2020
@bors
Copy link
Contributor

bors bot commented Sep 8, 2020

try

Build failed:

@devmotion
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Sep 8, 2020
@bors
Copy link
Contributor

bors bot commented Sep 8, 2020

try

Build failed:

@devmotion
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Sep 8, 2020
@bors
Copy link
Contributor

bors bot commented Sep 8, 2020

try

Build failed:

@torfjelde
Copy link
Member

Curious if there's anything I can do to help with this process!
I have some stuff I'd like to do in Turing which will be sooo much easier in the new (much nicer) interface you implemented:)

@devmotion
Copy link
Member Author

Sorry, I was quite busy the last weeks (had some deadlines last week), but hopefully this can be merged soon 🙂 It seems to work mostly, apart from some missing N in the definition of the HMC algorithm (IIRC the number of iterations has to be saved somewhere if we want to keep the same logic since it is not provided by AbstractMCMC anymore in the step where it was used before). As a first step, I updated the Turing folder (#173). If it is merged and dev is updated, I will rebase this PR such that it can be reviewed (after fixing the HMC issue).

bors bot pushed a commit that referenced this pull request Oct 5, 2020
This PR updates the Turing test folder of DynamicPPL (IMO they should be synced before finishing #150).

And I still think that we should get rid of this test dependency as much as possible 😄
@cpfiffer
Copy link
Member

Do you want a second pass on this one?

@devmotion
Copy link
Member Author

I also updated the corresponding PR to Turing: TuringLang/Turing.jl#1428 Tests pass locally.

cpfiffer
cpfiffer previously approved these changes Nov 15, 2020
Copy link
Member

@cpfiffer cpfiffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll conditionally approve -- I left two comments but they are extremely minor. Well done!

@cpfiffer
Copy link
Member

Okay, I'm good to merge this then.

@devmotion
Copy link
Member Author

@yebai @torfjelde @cpfiffer My plan would be to squash and merge this into the master branch, release a new breaking version 0.10 of DynamicPPL, and then update Turing by merging the corresponding PR over there (when tests pass - locally they do). Keeping this change in a separate branch (e.g. dev) would just delay the propagation of the changes to Turing which doesn't seem useful - but maybe you disagree? What's your opinion on this?

@cpfiffer
Copy link
Member

I say merge it in. No point in putting this into a dev branch, I think.

@torfjelde
Copy link
Member

I'm also fine with merging into master for this. I'll complete my review this weekend (sorry for the delay; been a proper week) if that's fine, though from a quick look I don't see anything that would make me reject.

@yebai
Copy link
Member

yebai commented Nov 19, 2020

@yebai @torfjelde @cpfiffer My plan would be to squash and merge this into the master branch, release a new breaking version 0.10 of DynamicPPL, and then update Turing by merging the corresponding PR over there (when tests pass - locally they do). Keeping this change in a separate branch (e.g. dev) would just delay the propagation of the changes to Turing which doesn't seem useful - but maybe you disagree? What's your opinion on this?

The plan sounds good to me!

Copy link
Member

@torfjelde torfjelde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still have some unresolved comments but nothing breaking (one code suggestion which is simply to make it a bit nicer to read), so I'm going to to approve now 👍

Awesome stuff @devmotion !

@devmotion
Copy link
Member Author

I propose a slight deviation from the plan above: maybe we can merge #193 first, so also users with the current Turing + AbstractMCMC setup can install Distributions 0.24?

@devmotion devmotion mentioned this pull request Nov 22, 2020
@cpfiffer
Copy link
Member

Sure, works for me.

Co-authored-by: Tor Erlend Fjelde <tor.erlend95@gmail.com>
@devmotion
Copy link
Member Author

I noticed that it is not completely straightforward to update Turing to Distributions 0.24 without this PR: #193 (comment)

@devmotion
Copy link
Member Author

Can someone review (and hopefully approve) #195 so we can run the tests properly when merging this PR?

@devmotion
Copy link
Member Author

Are you fine with this PR and approve it @torfjelde? I lost track a bit which things you still would like to be addressed 🙂

Copy link
Member

@torfjelde torfjelde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :)

@devmotion
Copy link
Member Author

Perfect 🙂

bors r+

bors bot pushed a commit that referenced this pull request Nov 26, 2020
This is a quite rough and initial draft of how to update DynamicPPL + Turing to AbstractMCMC 2 (tests don't pass currently). The update requires some major changes since `sample_init!` and `sample_end!` were removed. Some changes might have to be reverted or moved to other PRs, while others might be missing.

Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
@devmotion devmotion merged commit 6ac3922 into master Nov 26, 2020
@devmotion devmotion deleted the abstractmcmc2 branch November 26, 2020 13:30
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.

5 participants