Skip to content
Merged
Changes from 2 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
16 changes: 1 addition & 15 deletions src/context_implementations.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
using Distributions:
UnivariateDistribution, MultivariateDistribution, MatrixDistribution, Distribution
Comment on lines -1 to -2
Copy link
Member Author

Choose a reason for hiding this comment

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

there is a blanket using Distributions in src/DynamicPPL.jl so this shouldn't be needed


const AMBIGUITY_MSG =
"Ambiguous `LHS .~ RHS` or `@. LHS ~ RHS` syntax. The broadcasting " *
"can either be column-wise following the convention of Distributions.jl or " *
"element-wise following Julia's general broadcasting semantics. Please make sure " *
"that the element type of `LHS` is not a supertype of the support type of " *
"`AbstractVector` to eliminate ambiguity."

alg_str(spl::Sampler) = string(nameof(typeof(spl.alg)))
Copy link
Member Author

@penelopeysm penelopeysm Jun 16, 2025

Choose a reason for hiding this comment

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

alg_str is in fact used in the Turing test suite, but they just test that it exists, it's not actually used in any Turing library code. So I'm pretty confused. I don't see much of a point, though, because Sampler is on its way out (once TuringLang/Turing.jl#2555 is done we should be able to remove it).

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 think possibly this is a holdover from the time that Sampler was more heavily used -- a lot of this was gotten rid of a couple versions ago)


# utility funcs for querying sampler information
require_gradient(spl::Sampler) = false
require_particles(spl::Sampler) = false
using Distributions: Distribution

# Allows samplers, etc. to hook into the final logp accumulation in the tilde-pipeline.
function acclogp_assume!!(context::AbstractContext, vi::AbstractVarInfo, logp)
Expand Down
Loading