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

Removal of redundant backwards compat to_namedtuple_expr #280

Merged
merged 3 commits into from
Jul 18, 2021

Conversation

torfjelde
Copy link
Member

@torfjelde torfjelde commented Jul 16, 2021

Looking at to_namedtuple_expr it seems like it's leftover code to be compatible with Julia 1.2. Given that DPPL only supports Julia 1.3 or higher I've simplified the implementation, doing away with the namedtuple method.

EDIT: This also fixed a bug I ran into when using Zygote + @submodel in #267 . Struggling to come up with a MWE of the bug, but just adding merging this fixed it. This was also my original motivation for making this change, as Zygote was complaining about the namedtuple for some reason (something about "non-differentiable getfield").

@torfjelde
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 16, 2021
@bors
Copy link
Contributor

bors bot commented Jul 16, 2021

try

Timed out.

@yebai
Copy link
Member

yebai commented Jul 17, 2021

It's surprising that integration tests take more than 6h now: cancelled 20 hours ago in 6h 0m 4s.

Related TuringLang/Turing.jl#1660

@yebai
Copy link
Member

yebai commented Jul 17, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 17, 2021

👎 Rejected by too few approved reviews

@yebai
Copy link
Member

yebai commented Jul 17, 2021

bors r+

bors bot pushed a commit that referenced this pull request Jul 17, 2021
Looking at `to_namedtuple_expr` it seems like it's leftover code to be compatible with Julia 1.2. Given that DPPL only supports Julia 1.3 or higher I've simplified the implementation, doing away with the `namedtuple` method.

EDIT: This also fixed a bug I ran into when using Zygote + `@submodel` in #267 . Struggling to come up with a MWE of the bug, but just adding merging this fixed it. This was also my original motivation for making this change, as Zygote was complaining about the `namedtuple` for some reason (something about "non-differentiable getfield").

Co-authored-by: Hong Ge <hg344@cam.ac.uk>
@bors
Copy link
Contributor

bors bot commented Jul 17, 2021

Timed out.

@torfjelde
Copy link
Member Author

Yup, it seems like what I mentioned in the other PR is the case: need to also upper-bound Distributions.jl in these tests too.

@yebai yebai merged commit b82459a into master Jul 18, 2021
@yebai yebai deleted the tor/allargs-construction-improvement branch July 18, 2021 20:56
@yebai
Copy link
Member

yebai commented Jul 18, 2021

I merged this PR since all CI tests appear to be passing. Not sure why bors timed out.

@torfjelde
Copy link
Member Author

torfjelde commented Jul 19, 2021

I merged this PR since all CI tests appear to be passing. Not sure why bors timed out.

As I said above, they're timing out because Distributions@0.12.11 is being used. Fixed in #282 .

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.

2 participants