Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DynamicPPL"
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
version = "0.27.0"
version = "0.27.1"


[deps]
Expand Down
18 changes: 17 additions & 1 deletion src/DynamicPPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,28 @@ export AbstractVarInfo,
@submodel,
value_iterator_from_chain,
check_model,
check_model_and_trace
check_model_and_trace,
# Deprecated.
@logprob_str,
@prob_str

# Reexport
using Distributions: loglikelihood
export loglikelihood

# TODO: Remove once we feel comfortable people aren't using it anymore.
macro logprob_str(str)
return :(error(
"The `@logprob_str` macro is no longer supported. See https://turinglang.org/dev/docs/using-turing/guide/#querying-probabilities-from-model-or-chain for information on how to query probabilities, and https://github.com/TuringLang/DynamicPPL.jl/issues/356 for information regarding its removal.",
))
end

macro prob_str(str)
return :(error(
"The `@prob_str` macro is no longer supported. See https://turinglang.org/dev/docs/using-turing/guide/#querying-probabilities-from-model-or-chain for information on how to query probabilities, and https://github.com/TuringLang/DynamicPPL.jl/issues/356 for information regarding its removal.",
))
end

# Used here and overloaded in Turing
function getspace end

Expand Down
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ include("test_util.jl")
include("ad.jl")
end

@testset "prob and logprob macro" begin
@test_throws ErrorException prob"..."
@test_throws ErrorException logprob"..."
end

@testset "doctests" begin
DocMeta.setdocmeta!(
DynamicPPL,
Expand Down