Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper support for distributions with embedded support #462

Merged
merged 68 commits into from
Jun 15, 2023

Conversation

torfjelde
Copy link
Member

@torfjelde torfjelde commented Feb 6, 2023

Attempt at addressing #461.

I think the approach here is somewhat correct, but it's currently very dirty because of the intricacies of VarInfo implementation. This can be cleaned up, but will take some effort. Until I've done this, I leave this as a draft PR.

We also most certainly need to do some benchmarking before merging this as it could lead to some additional overhead.

NOTE: This is based on #457

src/utils.jl Outdated Show resolved Hide resolved
src/varinfo.jl Outdated Show resolved Hide resolved
src/varinfo.jl Outdated Show resolved Hide resolved
src/varinfo.jl Outdated Show resolved Hide resolved
src/varinfo.jl Outdated Show resolved Hide resolved
src/abstract_varinfo.jl Outdated Show resolved Hide resolved
src/abstract_varinfo.jl Outdated Show resolved Hide resolved
src/abstract_varinfo.jl Outdated Show resolved Hide resolved
src/abstract_varinfo.jl Outdated Show resolved Hide resolved
src/abstract_varinfo.jl Outdated Show resolved Hide resolved
src/context_implementations.jl Outdated Show resolved Hide resolved
src/context_implementations.jl Outdated Show resolved Hide resolved
src/context_implementations.jl Outdated Show resolved Hide resolved
src/utils.jl Outdated Show resolved Hide resolved
src/varinfo.jl Outdated Show resolved Hide resolved
src/utils.jl Outdated Show resolved Hide resolved
torfjelde and others added 2 commits February 12, 2023 15:06
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@torfjelde
Copy link
Member Author

I've solved the issue with AMH locally (it wasn't copying the return parameters, so they were all fixed to the same value) but I'm very confused as to why this hasn't been an issue before, i.e. why is this PR causing it to show up only now. Currently digging into this.

torfjelde and others added 2 commits June 5, 2023 20:34
…gLang/DynamicPPL.jl into torfjelde/support-embedded-support
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
src/DynamicPPL.jl Outdated Show resolved Hide resolved
src/utils.jl Outdated Show resolved Hide resolved
@torfjelde
Copy link
Member Author

Aight, I think this is good to go! Now there are quite a few PRs in the pipeline that will fix sampling for some distributions once we have this PR through, e.g. TuringLang/Bijectors.jl#246 and TuringLang/Bijectors.jl#263.

Hence it would be nice to get this merged.

My only worry with this PR is that it introduces some performance degradation, but by looking at the runtimes of the tests, it doesn't seem particularly significant + correctness of the program takes precedence over performance so it seems worth it (and then we can fix potential perf issues later on).

@torfjelde
Copy link
Member Author

I'll get this merged once TuringLang/Turing.jl#2001 has gone through so we can also run the integration tests (currently Turing.jl isn't comatible with 0.23, so I can't run the integration tests).

@yebai yebai enabled auto-merge June 15, 2023 12:03
@yebai yebai added this pull request to the merge queue Jun 15, 2023
Merged via the queue into master with commit 7b01d25 Jun 15, 2023
12 of 13 checks passed
@yebai yebai deleted the torfjelde/support-embedded-support branch June 15, 2023 12:35
@torfjelde
Copy link
Member Author

Why was this merged? Was it merged before the Turing version was released?

@yebai
Copy link
Member

yebai commented Jun 16, 2023

It’s merged after the new Turing release

@torfjelde
Copy link
Member Author

But then how did it make it's way through the merge queue when the Turing tests are failing on master?

@devmotion
Copy link
Member

I guess it's because the Turing test status is not required anymore (since as previously noticed otherwise it's not possible to add the PR to the merge queue).

Ultimately, I guess the problem is as discussed in e.g. https://github.com/orgs/community/discussions/46757#discussioncomment-5786544 and https://github.com/orgs/community/discussions/46757#discussioncomment-6035779: Github does not distinguish between status checks that are required to add a PR to the queue and status checks that are required to merge a PR in the queue into the desired branch.

It seems currently Github merge queue is not a proper replacement for bors 😞

@torfjelde
Copy link
Member Author

Oooh true I forgot we were also discussing how to do this a few weeks ago.

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.

None yet

4 participants