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

Disable Tapir on Julia 1.11 #2368

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/essential/Essential.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export @model,
@logprob_str,
@prob_str

# AutoTapir is only supported by ADTypes v1.0 and above.
@static if VERSION >= v"1.10" && pkgversion(ADTypes) >= v"1"
# AutoTapir is only supported on Julia 1.10 and by ADTypes v1.0 and above.
@static if (v"1.10" <= VERSION < v"1.11") && pkgversion(ADTypes) >= v"1"
using ADTypes: AutoTapir
export AutoTapir
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_utils/ad_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ adbackends = [
Turing.AutoForwardDiff(; chunksize=0), Turing.AutoReverseDiff(; compile=false)
]

# Tapir isn't supported for older Julia versions, hence the check.
# Tapir isn't supported for older Julia versions or for 1.11, hence the check.
install_tapir = isdefined(Turing, :AutoTapir)
Copy link
Member

Choose a reason for hiding this comment

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

@penelopeysm, let's replace all references to Tapir with Mooncake so we don't need to maintain this legacy testing code.

Copy link
Member Author

Choose a reason for hiding this comment

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

I did that as part of #2341 😄 But (correct me if I'm wrong) as long as Mooncake is failing on 1.11, we actually need to keep this conditional import around, because Mooncake doesn't specify that it doesn't work on 1.11.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, hold on, I literally just saw that Mooncake is now fixed for 1.11 🎉 Let's see if this can be simplified.

if install_tapir
# TODO(mhauru) Is there a better way to install optional dependencies like this?
Expand Down
Loading