-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ReTestItems for parallel testing
- Loading branch information
Showing
25 changed files
with
423 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,78 @@ | ||
name = "DeepEquilibriumNetworks" | ||
uuid = "6748aba7-0e9b-415e-a410-ae3cc0ecb334" | ||
authors = ["Avik Pal <[email protected]>"] | ||
version = "2.0.3" | ||
version = "2.1.0" | ||
|
||
[deps] | ||
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" | ||
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" | ||
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" | ||
ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471" | ||
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" | ||
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" | ||
FastClosures = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
Lux = "b2108857-7c20-44ae-9111-449ecde12c47" | ||
LuxCore = "bb33d45b-7691-41d6-9220-0943567d0623" | ||
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" | ||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" | ||
SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" | ||
TruncatedStacktraces = "781d530d-4396-4725-bb49-402e4bee1e77" | ||
|
||
[weakdeps] | ||
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" | ||
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" | ||
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" | ||
|
||
[extensions] | ||
DeepEquilibriumNetworksLinearSolveSciMLSensitivityExt = ["LinearSolve", "SciMLSensitivity"] | ||
DeepEquilibriumNetworksSciMLSensitivityExt = ["LinearSolve", "SciMLSensitivity"] | ||
DeepEquilibriumNetworksZygoteExt = "Zygote" | ||
|
||
[compat] | ||
ADTypes = "0.2.5" | ||
ADTypes = "0.2.5, 1" | ||
Aqua = "0.8.7" | ||
ChainRulesCore = "1" | ||
CommonSolve = "0.2.4" | ||
ConcreteStructs = "0.2" | ||
ConstructionBase = "1" | ||
DiffEqBase = "6.119" | ||
ExplicitImports = "1.4.1" | ||
FastClosures = "0.3" | ||
LinearAlgebra = "1" | ||
Functors = "0.4.10" | ||
LinearSolve = "2.21.2" | ||
Lux = "0.5.11" | ||
Lux = "0.5.37" | ||
LuxCUDA = "0.3.2" | ||
LuxCore = "0.1.14" | ||
LuxTestUtils = "0.1.15" | ||
NLsolve = "4.5.1" | ||
NonlinearSolve = "3.10.0" | ||
OrdinaryDiffEq = "6.74.1" | ||
PrecompileTools = "1" | ||
Random = "1" | ||
Random = "1.10" | ||
ReTestItems = "1.23.1" | ||
SciMLBase = "2" | ||
SciMLSensitivity = "7.43" | ||
Statistics = "1" | ||
StableRNGs = "1.0.2" | ||
Statistics = "1.10" | ||
SteadyStateDiffEq = "2" | ||
TruncatedStacktraces = "1.1" | ||
Zygote = "0.6.67" | ||
julia = "1.9" | ||
Test = "1.10" | ||
Zygote = "0.6.69" | ||
julia = "1.10" | ||
|
||
[extras] | ||
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" | ||
Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196" | ||
LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda" | ||
LuxTestUtils = "ac9de150-d08f-4546-94fb-7472b5760531" | ||
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" | ||
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" | ||
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" | ||
ReTestItems = "817f1d60-ba6b-4fd5-9520-3cf149f6a823" | ||
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" | ||
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" | ||
|
||
[targets] | ||
test = ["Aqua", "ExplicitImports", "Functors", "LuxCUDA", "LuxTestUtils", "NLsolve", "NonlinearSolve", "OrdinaryDiffEq", "ReTestItems", "SciMLSensitivity", "StableRNGs", "Test", "Zygote"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
pages = [ | ||
"Home" => "index.md", | ||
"Tutorials" => [ | ||
"tutorials/basic_mnist_deq.md", | ||
"tutorials/reduced_dim_deq.md" | ||
], | ||
"API References" => "api.md", | ||
"References" => "references.md" | ||
] | ||
pages = ["Home" => "index.md", | ||
"Tutorials" => ["tutorials/basic_mnist_deq.md", "tutorials/reduced_dim_deq.md"], | ||
"API References" => "api.md", "References" => "references.md"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
...NetworksLinearSolveSciMLSensitivityExt.jl → ...EquilibriumNetworksSciMLSensitivityExt.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
module DeepEquilibriumNetworksLinearSolveSciMLSensitivityExt | ||
module DeepEquilibriumNetworksSciMLSensitivityExt | ||
|
||
# Linear Solve is a dependency of SciMLSensitivity, so we only need to load SciMLSensitivity | ||
# to load this extension | ||
using LinearSolve, SciMLBase, SciMLSensitivity | ||
import DeepEquilibriumNetworks: __default_sensealg | ||
using LinearSolve: SimpleGMRES | ||
using SciMLBase: SteadyStateProblem, ODEProblem | ||
using SciMLSensitivity: SteadyStateAdjoint, GaussAdjoint, ZygoteVJP | ||
using DeepEquilibriumNetworks: DEQs | ||
|
||
@inline function __default_sensealg(prob::SteadyStateProblem) | ||
@inline function DEQs.__default_sensealg(prob::SteadyStateProblem) | ||
# We want to avoid the cost for cache construction for linsolve = nothing | ||
# For small problems we should use concrete jacobian but we assume users want to solve | ||
# large problems with this package so we default to GMRES and avoid runtime dispatches | ||
linsolve = SimpleGMRES{true}(; blocksize=prod(size(prob.u0)[1:(end - 1)])) | ||
linsolve_kwargs = (; maxiters=10, abstol=1e-3, reltol=1e-3) | ||
return SteadyStateAdjoint(; linsolve, linsolve_kwargs, autojacvec=ZygoteVJP()) | ||
end | ||
@inline __default_sensealg(::ODEProblem) = GaussAdjoint(; autojacvec=ZygoteVJP()) | ||
@inline DEQs.__default_sensealg(prob::ODEProblem) = GaussAdjoint(; autojacvec=ZygoteVJP()) | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.