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 defaults #382

Merged
merged 2 commits into from
Mar 3, 2024
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
2 changes: 0 additions & 2 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ icnf = construct(
compute_mode = ZygoteMatrixMode,
tspan = (0.0f0, 13.0f0),
steer_rate = 0.1f0,
sol_kwargs = ContinuousNormalizingFlows.sol_kwargs_defaults.medium_noad,
rng,
)
ps, st = Lux.setup(icnf.rng, icnf)
Expand Down Expand Up @@ -61,7 +60,6 @@ icnf2 = construct(
compute_mode = ZygoteMatrixMode,
tspan = (0.0f0, 13.0f0),
steer_rate = 0.1f0,
sol_kwargs = ContinuousNormalizingFlows.sol_kwargs_defaults.medium_noad,
rng,
)

Expand Down
1 change: 0 additions & 1 deletion src/ContinuousNormalizingFlows.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ using AbstractDifferentiation,
Statistics,
Zygote

include("defaults.jl")
include("types.jl")

include("planar_layer.jl")
Expand Down
5 changes: 4 additions & 1 deletion src/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ function construct(
AutoForwardDiff(),
AutoZygote(),
),
sol_kwargs::NamedTuple = sol_kwargs_defaults.medium,
sol_kwargs::NamedTuple = (
save_everystep = false,
alg = Tsit5(; thread = OrdinaryDiffEq.True()),
),
rng::AbstractRNG = rng_AT(resource),
λ₁::AbstractFloat = convert(data_type, 1e-2),
λ₂::AbstractFloat = convert(data_type, 1e-2),
Expand Down
40 changes: 0 additions & 40 deletions src/defaults.jl

This file was deleted.

12 changes: 1 addition & 11 deletions test/call_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,8 @@
inplace,
resource,
steer_rate = convert(data_type, 0.1),
sol_kwargs = ContinuousNormalizingFlows.sol_kwargs_defaults.medium_noad,
),
construct(
mt,
nn,
nvars;
data_type,
compute_mode,
inplace,
resource,
sol_kwargs = ContinuousNormalizingFlows.sol_kwargs_defaults.medium_noad,
),
construct(mt, nn, nvars; data_type, compute_mode, inplace, resource),
)
ps, st = Lux.setup(icnf.rng, icnf)
ps = ComponentArrays.ComponentArray(ps)
Expand Down
12 changes: 1 addition & 11 deletions test/fit_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,8 @@
inplace,
resource,
steer_rate = convert(data_type, 0.1),
sol_kwargs = ContinuousNormalizingFlows.sol_kwargs_defaults.medium_noad,
),
construct(
mt,
nn,
nvars;
data_type,
compute_mode,
inplace,
resource,
sol_kwargs = ContinuousNormalizingFlows.sol_kwargs_defaults.medium_noad,
),
construct(mt, nn, nvars; data_type, compute_mode, inplace, resource),
)
if mt <: ContinuousNormalizingFlows.AbstractCondICNF
model = CondICNFModel(icnf; n_epochs, adtype)
Expand Down
1 change: 0 additions & 1 deletion test/instability_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
compute_mode = ZygoteMatrixMode,
tspan = (0.0f0, 13.0f0),
steer_rate = 0.1f0,
sol_kwargs = ContinuousNormalizingFlows.sol_kwargs_defaults.medium_noad,
)
ps, st = Lux.setup(icnf.rng, icnf)
ps = ComponentArrays.ComponentArray(ps)
Expand Down
Loading