Skip to content

Commit

Permalink
remove defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
prbzrg committed Mar 2, 2024
1 parent dad37ca commit 342d377
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 70 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
ComputationalResources = "ed09eef8-17a6-5b46-8889-db040fac31e3"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DistributionsAD = "ced4e74d-a319-5a8a-b0ac-84af2272839c"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Expand All @@ -24,7 +25,6 @@ NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2"
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
Expand All @@ -49,6 +49,7 @@ ComponentArrays = "0.15.5"
ComputationalResources = "0.3"
DataFrames = "1"
Dates = "1"
DifferentialEquations = "7"
Distributions = "0.25"
DistributionsAD = "0.6"
FillArrays = "1"
Expand All @@ -62,7 +63,6 @@ NNlib = "0.9"
Optimisers = "0.3"
Optimization = "3.15"
OptimizationOptimisers = "0.1, 0.2"
OrdinaryDiffEq = "6"
ProgressMeter = "1"
Random = "1"
SciMLBase = "2"
Expand Down
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
3 changes: 1 addition & 2 deletions src/ContinuousNormalizingFlows.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ using AbstractDifferentiation,
ComponentArrays,
ComputationalResources,
DataFrames,
DifferentialEquations,
Dates,
Distributions,
DistributionsAD,
Expand All @@ -21,7 +22,6 @@ using AbstractDifferentiation,
Optimisers,
Optimization,
OptimizationOptimisers,
OrdinaryDiffEq,
ProgressMeter,
Random,
ScientificTypes,
Expand All @@ -31,7 +31,6 @@ using AbstractDifferentiation,
Statistics,
Zygote

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

include("planar_layer.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function construct(
AutoForwardDiff(),
AutoZygote(),
),
sol_kwargs::NamedTuple = sol_kwargs_defaults.medium,
sol_kwargs::NamedTuple = (save_everystep = false,),
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

0 comments on commit 342d377

Please sign in to comment.