Skip to content

Conversation

@devmotion
Copy link
Member

This PR fixes TuringLang/Turing.jl#1525 (comment) and fixes the model definition and some warning on Julia 1.6. It also includes a line number node of the call site instead of a reference to src/compiler.jl in the model definition for easier debugging. On Julia 1.6, initially I got warnings about method redefinitions (models of the same name) that all referred to line 344 in src/compiler.jl instead of the place where the model was defined by the user.

Turing tests are disabled currently since they crash (segmentation fault). Might be related to the fact that Libtask is not compatible with Julia 1.6 yet (therefore also an older version of Turing and Libtask would be used on Julia 1.6).

@devmotion
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jan 15, 2021
@devmotion
Copy link
Member Author

The coverage drop is real, somehow I managed to disable the Turing tests completely...

@devmotion
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jan 15, 2021
@cpfiffer
Copy link
Member

The coverage drop is real, somehow I managed to disable the Turing tests completely...

That fixes the test failures, at any rate 😉

@devmotion
Copy link
Member Author

OK, I fixed it.

# (not added automatically on Julia 1.3, see e.g. PR #209)
if !(joinpath(DIRECTORY_Turing_tests, "Project.toml") in Base.load_path())
pushfirst!(LOAD_PATH, DIRECTORY_Turing_tests)
@static if VERSION <= v"1.5.3"
Copy link
Member

Choose a reason for hiding this comment

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

Are we going to remove this flag after Turing is 1.5.3 compatible? Or is Libtask still the hangup here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Turing and Libtask are fine with 1.5.3, only with Julia 1.6 and nightlies Julia segfaults. I am pretty sure it is only due to Libtask, in particular since the model with NUTS in the linked issue runs on Julia 1.6 without any problems.

Copy link
Member

Choose a reason for hiding this comment

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

Okay. Let's revisit this flag when the 1.6 release candidate is out.

# (not added automatically on Julia 1.3, see e.g. PR #209)
if !(joinpath(DIRECTORY_Turing_tests, "Project.toml") in Base.load_path())
pushfirst!(LOAD_PATH, DIRECTORY_Turing_tests)
@static if VERSION <= v"1.5.3"
Copy link
Member

Choose a reason for hiding this comment

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

Okay. Let's revisit this flag when the 1.6 release candidate is out.

@devmotion
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Jan 15, 2021
This PR fixes TuringLang/Turing.jl#1525 (comment) and fixes the model definition and some warning on Julia 1.6. It also includes a line number node of the call site instead of a reference to `src/compiler.jl` in the model definition for easier debugging. On Julia 1.6, initially I got warnings about method redefinitions (models of the same name) that all referred to line 344 in `src/compiler.jl` instead of the place where the model was defined by the user.

Turing tests are disabled currently since they crash (segmentation fault). Might be related to the fact that Libtask is not compatible with Julia 1.6 yet (therefore also an older version of Turing and Libtask would be used on Julia 1.6).

Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
@bors bors bot changed the title Fixes for Julia 1.6 [Merged by Bors] - Fixes for Julia 1.6 Jan 15, 2021
@bors bors bot closed this Jan 15, 2021
@bors bors bot deleted the dw/julia_1_6 branch January 15, 2021 17:08
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.

Regression model fails on Julia 1.6 beta1

3 participants