Skip to content

Commit

Permalink
Merge pull request #921 from SciML/test
Browse files Browse the repository at this point in the history
Fix test infrastructure
  • Loading branch information
ChrisRackauckas authored May 16, 2024
2 parents d427c7c + aecc7c7 commit ad80fe5
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 90 deletions.
33 changes: 33 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,36 @@ Tracker = "0.2.29"
Zygote = "0.6"
ZygoteRules = "0.2"
julia = "1.9"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
DelayDiffEq = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda"
MLDataUtils = "cc2ba9b6-d476-5e6d-8eaf-a92d5412d41d"
MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458"
NLopt = "76087f3c-5699-56af-9a33-bf431cd00edd"
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
OneHotArrays = "0b1bfda6-eb8a-41d2-88d8-f5af5cad476f"
Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2"
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "BenchmarkTools", "CUDA", "DataInterpolations", "DelayDiffEq", "DiffEqCallbacks", "Distances", "Distributed", "Flux", "LuxCUDA", "MLDataUtils", "MLDatasets", "NLopt", "NNlib", "OneHotArrays", "Optimisers", "Optimization", "OptimizationOptimJL", "OptimizationOptimisers", "OrdinaryDiffEq", "Printf", "RecursiveArrayTools", "ReverseDiff", "SafeTestsets", "StaticArrays", "Statistics", "StochasticDiffEq", "Test"]
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ For information on using the package,
[in-development documentation](https://docs.sciml.ai/DiffEqFlux/dev/) for the version of
the documentation, which contains the unreleased features.


## Problem Domain

DiffEqFlux.jl is for implicit layer machine learning.
Expand Down
39 changes: 0 additions & 39 deletions test/Project.toml

This file was deleted.

45 changes: 0 additions & 45 deletions test/neural_gde.jl

This file was deleted.

3 changes: 0 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ const is_CI = haskey(ENV, "CI")
@safetestset "Neural DE Tests" begin
include("neural_de.jl")
end
@safetestset "Neural Graph DE" begin
include("neural_gde.jl")
end
@safetestset "Tensor Product Layer" begin
include("tensor_product_test.jl")
end
Expand Down
6 changes: 4 additions & 2 deletions test/tensor_product_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ function run_test(f, layer, atol, N)
optfunc = Optimization.OptimizationFunction((x, p) -> loss_function(x),
Optimization.AutoZygote())
optprob = Optimization.OptimizationProblem(optfunc, ps)
res = Optimization.solve(optprob, OptimizationOptimisers.Adam(0.1); callback = cb, maxiters = 100)
res = Optimization.solve(
optprob, OptimizationOptimisers.Adam(0.1); callback = cb, maxiters = 100)
optprob = Optimization.OptimizationProblem(optfunc, res.minimizer)
res = Optimization.solve(optprob, OptimizationOptimisers.Adam(0.01); callback = cb, maxiters = 100)
res = Optimization.solve(
optprob, OptimizationOptimisers.Adam(0.01); callback = cb, maxiters = 100)
optprob = Optimization.OptimizationProblem(optfunc, res.minimizer)
res = Optimization.solve(optprob, BFGS(); callback = cb, maxiters = 200)
opt = res.minimizer
Expand Down

0 comments on commit ad80fe5

Please sign in to comment.