Skip to content

Commit

Permalink
removing last HMCKernel legacy function (#339)
Browse files Browse the repository at this point in the history
* removing last HMCKernel legacy function

* AbstractTrajectory

* Revert "AbstractTrajectory"

This reverts commit 103fded.
  • Loading branch information
JaimeRZP authored Jul 27, 2023
1 parent bb4b534 commit 37481ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
17 changes: 1 addition & 16 deletions src/AdvancedHMC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,9 @@ export Trajectory,

# Useful defaults

# Deprecations for trajectory.jl

abstract type AbstractTrajectory end

struct StaticTrajectory{TS} end
@deprecate StaticTrajectory{TS}(int::AbstractIntegrator, L) where {TS} HMCKernel(
Trajectory{TS}(int, FixedNSteps(L)),
)
@deprecate StaticTrajectory(int::AbstractIntegrator, L) HMCKernel(
Trajectory{EndPointTS}(int, FixedNSteps(L)),
)
@deprecate StaticTrajectory::AbstractScalarOrVec{<:Real}, L) HMCKernel(
Trajectory{EndPointTS}(Leapfrog(ϵ), FixedNSteps(L)),
)

@deprecate find_good_eps find_good_stepsize

export StaticTrajectory, find_good_eps
export find_good_eps

include("adaptation/Adaptation.jl")
using .Adaptation
Expand Down
2 changes: 1 addition & 1 deletion test/sampler-vec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ include("common.jl")

# Simple time benchmark
let metricT = UnitEuclideanMetric
κ = StaticTrajectory(lf, n_steps)
κ = HMCKernel(Trajectory{EndPointTS}(lf, FixedNSteps(n_steps)))

time_mat = Vector{Float64}(undef, n_chains_max)
for (i, n_chains) in enumerate(n_chains_list)
Expand Down

0 comments on commit 37481ac

Please sign in to comment.