Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove sol_args #293

Merged
merged 1 commit into from
Sep 26, 2023
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
11 changes: 4 additions & 7 deletions src/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function construct(
steer_rate::AbstractFloat = zero(data_type),
differentiation_backend::AbstractDifferentiation.AbstractBackend = AbstractDifferentiation.ZygoteBackend(),
autodiff_backend::ADTypes.AbstractADType = AutoZygote(),
sol_args::Tuple = (),
sol_kwargs::Dict = Dict(
:alg_hints => [:nonstiff],
:alg => VCABM(),
Expand All @@ -43,7 +42,6 @@ function construct(
typeof(steerdist),
typeof(differentiation_backend),
typeof(autodiff_backend),
typeof(sol_args),
typeof(sol_kwargs),
typeof(rng),
typeof(_fnn),
Expand All @@ -57,7 +55,6 @@ function construct(
steerdist,
differentiation_backend,
autodiff_backend,
sol_args,
sol_kwargs,
rng,
_fnn,
Expand Down Expand Up @@ -145,7 +142,7 @@ end
prob::SciMLBase.AbstractODEProblem{<:AbstractVector{<:Real}, NTuple{2, T}, false},
) where {T <: AbstractFloat}
n_aug = n_augment(icnf, mode)
sol = solve(prob, icnf.sol_args...; icnf.sol_kwargs...)
sol = solve(prob)
fsol = sol[:, end]
z = fsol[begin:(end - n_aug - 1)]
Δlogp = fsol[(end - n_aug)]
Expand All @@ -164,7 +161,7 @@ end
prob::SciMLBase.AbstractODEProblem{<:AbstractMatrix{<:Real}, NTuple{2, T}, false},
) where {T <: AbstractFloat}
n_aug = n_augment(icnf, mode)
sol = solve(prob, icnf.sol_args...; icnf.sol_kwargs...)
sol = solve(prob)
fsol = sol[:, :, end]
z = fsol[begin:(end - n_aug - 1), :]
Δlogp = fsol[(end - n_aug), :]
Expand All @@ -184,7 +181,7 @@ end
) where {T <: AbstractFloat}
n_aug = n_augment(icnf, mode)
n_aug_input = n_augment_input(icnf)
sol = solve(prob, icnf.sol_args...; icnf.sol_kwargs...)
sol = solve(prob)
fsol = sol[:, end]
z = fsol[begin:(end - n_aug_input - n_aug - 1)]
z
Expand All @@ -197,7 +194,7 @@ end
) where {T <: AbstractFloat}
n_aug = n_augment(icnf, mode)
n_aug_input = n_augment_input(icnf)
sol = solve(prob, icnf.sol_args...; icnf.sol_kwargs...)
sol = solve(prob)
fsol = sol[:, :, end]
z = fsol[begin:(end - n_aug_input - n_aug - 1), :]
z
Expand Down
2 changes: 0 additions & 2 deletions src/cond_ffjord.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ struct CondFFJORD{
STEERDIST <: Distribution,
DIFFERENTIATION_BACKEND <: AbstractDifferentiation.AbstractBackend,
AUTODIFF_BACKEND <: ADTypes.AbstractADType,
SOL_ARGS <: Tuple,
SOL_KWARGS <: Dict,
RNG <: AbstractRNG,
_FNN <: Function,
Expand All @@ -31,7 +30,6 @@ struct CondFFJORD{
steerdist::STEERDIST
differentiation_backend::DIFFERENTIATION_BACKEND
autodiff_backend::AUTODIFF_BACKEND
sol_args::SOL_ARGS
sol_kwargs::SOL_KWARGS
rng::RNG
_fnn::_FNN
Expand Down
2 changes: 0 additions & 2 deletions src/cond_planar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ struct CondPlanar{
STEERDIST <: Distribution,
DIFFERENTIATION_BACKEND <: AbstractDifferentiation.AbstractBackend,
AUTODIFF_BACKEND <: ADTypes.AbstractADType,
SOL_ARGS <: Tuple,
SOL_KWARGS <: Dict,
RNG <: AbstractRNG,
_FNN <: Function,
Expand All @@ -31,7 +30,6 @@ struct CondPlanar{
steerdist::STEERDIST
differentiation_backend::DIFFERENTIATION_BACKEND
autodiff_backend::AUTODIFF_BACKEND
sol_args::SOL_ARGS
sol_kwargs::SOL_KWARGS
rng::RNG
_fnn::_FNN
Expand Down
5 changes: 0 additions & 5 deletions src/cond_rnode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ struct CondRNODE{
STEERDIST <: Distribution,
DIFFERENTIATION_BACKEND <: AbstractDifferentiation.AbstractBackend,
AUTODIFF_BACKEND <: ADTypes.AbstractADType,
SOL_ARGS <: Tuple,
SOL_KWARGS <: Dict,
RNG <: AbstractRNG,
_FNN <: Function,
Expand All @@ -31,7 +30,6 @@ struct CondRNODE{
steerdist::STEERDIST
differentiation_backend::DIFFERENTIATION_BACKEND
autodiff_backend::AUTODIFF_BACKEND
sol_args::SOL_ARGS
sol_kwargs::SOL_KWARGS
rng::RNG
_fnn::_FNN
Expand All @@ -55,7 +53,6 @@ function construct(
steer_rate::AbstractFloat = zero(data_type),
differentiation_backend::AbstractDifferentiation.AbstractBackend = AbstractDifferentiation.ZygoteBackend(),
autodiff_backend::ADTypes.AbstractADType = AutoZygote(),
sol_args::Tuple = (),
sol_kwargs::Dict = Dict(
:alg_hints => [:nonstiff],
:alg => VCABM(),
Expand Down Expand Up @@ -84,7 +81,6 @@ function construct(
typeof(steerdist),
typeof(differentiation_backend),
typeof(autodiff_backend),
typeof(sol_args),
typeof(sol_kwargs),
typeof(rng),
typeof(_fnn),
Expand All @@ -98,7 +94,6 @@ function construct(
steerdist,
differentiation_backend,
autodiff_backend,
sol_args,
sol_kwargs,
rng,
_fnn,
Expand Down
2 changes: 0 additions & 2 deletions src/ffjord.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ struct FFJORD{
STEERDIST <: Distribution,
DIFFERENTIATION_BACKEND <: AbstractDifferentiation.AbstractBackend,
AUTODIFF_BACKEND <: ADTypes.AbstractADType,
SOL_ARGS <: Tuple,
SOL_KWARGS <: Dict,
RNG <: AbstractRNG,
_FNN <: Function,
Expand All @@ -33,7 +32,6 @@ struct FFJORD{
steerdist::STEERDIST
differentiation_backend::DIFFERENTIATION_BACKEND
autodiff_backend::AUTODIFF_BACKEND
sol_args::SOL_ARGS
sol_kwargs::SOL_KWARGS
rng::RNG
_fnn::_FNN
Expand Down
2 changes: 0 additions & 2 deletions src/planar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ struct Planar{
STEERDIST <: Distribution,
DIFFERENTIATION_BACKEND <: AbstractDifferentiation.AbstractBackend,
AUTODIFF_BACKEND <: ADTypes.AbstractADType,
SOL_ARGS <: Tuple,
SOL_KWARGS <: Dict,
RNG <: AbstractRNG,
_FNN <: Function,
Expand All @@ -33,7 +32,6 @@ struct Planar{
steerdist::STEERDIST
differentiation_backend::DIFFERENTIATION_BACKEND
autodiff_backend::AUTODIFF_BACKEND
sol_args::SOL_ARGS
sol_kwargs::SOL_KWARGS
rng::RNG
_fnn::_FNN
Expand Down
5 changes: 0 additions & 5 deletions src/rnode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ struct RNODE{
STEERDIST <: Distribution,
DIFFERENTIATION_BACKEND <: AbstractDifferentiation.AbstractBackend,
AUTODIFF_BACKEND <: ADTypes.AbstractADType,
SOL_ARGS <: Tuple,
SOL_KWARGS <: Dict,
RNG <: AbstractRNG,
_FNN <: Function,
Expand All @@ -33,7 +32,6 @@ struct RNODE{
steerdist::STEERDIST
differentiation_backend::DIFFERENTIATION_BACKEND
autodiff_backend::AUTODIFF_BACKEND
sol_args::SOL_ARGS
sol_kwargs::SOL_KWARGS
rng::RNG
_fnn::_FNN
Expand All @@ -57,7 +55,6 @@ function construct(
steer_rate::AbstractFloat = zero(data_type),
differentiation_backend::AbstractDifferentiation.AbstractBackend = AbstractDifferentiation.ZygoteBackend(),
autodiff_backend::ADTypes.AbstractADType = AutoZygote(),
sol_args::Tuple = (),
sol_kwargs::Dict = Dict(
:alg_hints => [:nonstiff],
:alg => VCABM(),
Expand Down Expand Up @@ -86,7 +83,6 @@ function construct(
typeof(steerdist),
typeof(differentiation_backend),
typeof(autodiff_backend),
typeof(sol_args),
typeof(sol_kwargs),
typeof(rng),
typeof(_fnn),
Expand All @@ -100,7 +96,6 @@ function construct(
steerdist,
differentiation_backend,
autodiff_backend,
sol_args,
sol_kwargs,
rng,
_fnn,
Expand Down