Skip to content

Commit

Permalink
export for compat and make errors runtime rather than parsetime
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde committed May 17, 2024
1 parent 7e56bae commit 6f15c32
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/DynamicPPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,26 @@ 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've updated tutorials, etc.
macro logprob_str(str)
return error(
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(
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
Expand Down

0 comments on commit 6f15c32

Please sign in to comment.