Skip to content

Commit b51e564

Browse files
committed
Remove getspace
1 parent cca239f commit b51e564

File tree

5 files changed

+2
-9
lines changed

5 files changed

+2
-9
lines changed

HISTORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This release removes the feature of `VarInfo` where it kept track of which varia
1616
- `keys(::VarInfo)` no longer accepts a sampler as an argument
1717
- `VarInfo(::VarInfo, ::Sampler, ::AbstactVector)` no longer accepts the sampler argument.
1818
- `push!!` and `push!` no longer accept samplers or `Selector`s as arguments
19-
- `getgid`, `setgid!`, `updategid!`, and `inspace` no longer exist
19+
- `getgid`, `setgid!`, `updategid!`, `getspace`, and `inspace` no longer exist
2020

2121
### Reverse prefixing order
2222

src/DynamicPPL.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ macro prob_str(str)
149149
))
150150
end
151151

152-
# Used here and overloaded in Turing
153-
function getspace end
154-
155152
"""
156153
AbstractVarInfo
157154

src/sampler.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Sampling algorithm that samples unobserved random variables from their prior dis
1818
"""
1919
struct SampleFromPrior <: AbstractSampler end
2020

21-
getspace(::Union{SampleFromPrior,SampleFromUniform}) = ()
22-
2321
# Initializations.
2422
init(rng, dist, ::SampleFromPrior) = rand(rng, dist)
2523
function init(rng, dist, ::SampleFromUniform)

test/ad.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
σ = 0.3
4242
y = @. rand(sin(t) + Normal(0, σ))
4343
@model function state_space(y, TT, ::Type{T}=Float64) where {T}
44-
# Priors
44+
# Priors
4545
α ~ Normal(y[1], 0.001)
4646
τ ~ Exponential(1)
4747
η ~ filldist(Normal(0, 1), TT - 1)
@@ -63,7 +63,6 @@
6363
# overload assume so that model evaluation doesn't fail due to a lack
6464
# of implementation
6565
struct MyEmptyAlg end
66-
DynamicPPL.getspace(::DynamicPPL.Sampler{MyEmptyAlg}) = ()
6766
DynamicPPL.assume(rng, ::DynamicPPL.Sampler{MyEmptyAlg}, dist, vn, vi) =
6867
DynamicPPL.assume(dist, vn, vi)
6968

test/sampler.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
)
6868
return vi, nothing
6969
end
70-
DynamicPPL.getspace(::Sampler{<:OnlyInitAlg}) = ()
7170

7271
# initial samplers
7372
DynamicPPL.initialsampler(::Sampler{OnlyInitAlgUniform}) = SampleFromUniform()

0 commit comments

Comments
 (0)