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

chore: trigger build with latest Lux #882

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
32 changes: 19 additions & 13 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,45 +42,48 @@ Adapt = "4"
AdvancedHMC = "0.6.1"
Aqua = "0.8"
ArrayInterface = "7.9"
CUDA = "5.3"
CUDA = "5.3.2"
ChainRulesCore = "1.24"
ComponentArrays = "0.15.14"
ComponentArrays = "0.15.16"
Cubature = "1.5"
DiffEqNoiseProcess = "5.20"
Distributions = "0.25.107"
DocStringExtensions = "0.9.3"
DomainSets = "0.6, 0.7"
Flux = "0.14.11"
Flux = "0.14.17"
ForwardDiff = "0.10.36"
Functors = "0.4.10"
Functors = "0.4.12"
Integrals = "4.4"
LineSearches = "7.2"
LinearAlgebra = "1"
LinearAlgebra = "1.10"
LogDensityProblems = "2"
Lux = "0.5.58"
Lux = "0.5.65"
LuxCUDA = "0.3.2"
LuxCore = "0.1.24"
LuxLib = "0.3.48"
MCMCChains = "6"
MethodOfLines = "0.11"
ModelingToolkit = "9.9"
MonteCarloMeasurements = "1.1"
Optim = "1.7.8"
Optimization = "3.24"
Optimization = "3.25"
OptimizationOptimJL = "0.2.1"
OptimizationOptimisers = "0.2.1"
OrdinaryDiffEq = "6.74"
Pkg = "1"
OrdinaryDiffEq = "6.87"
Pkg = "1.10"
Preferences = "1.4.3"
QuasiMonteCarlo = "0.3.2"
Random = "1"
Reexport = "1.2"
RuntimeGeneratedFunctions = "0.5.12"
SafeTestsets = "0.1"
SciMLBase = "2.28"
SciMLBase = "2.34"
Statistics = "1.10"
SymbolicUtils = "1.5, 2, 3"
Symbolics = "5.27.1, 6"
Test = "1"
Test = "1.10"
UnPack = "1"
Zygote = "0.6.69"
Zygote = "0.6.70"
julia = "1.10"

[extras]
Expand All @@ -89,12 +92,15 @@ CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255"
LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda"
LuxCore = "bb33d45b-7691-41d6-9220-0943567d0623"
LuxLib = "82251201-b29d-42c6-8e01-566dec8acb11"
MethodOfLines = "94925ecb-adb7-4558-8ed8-f975c56a0bf4"
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "Test", "CUDA", "SafeTestsets", "OptimizationOptimJL", "Pkg", "OrdinaryDiffEq", "LineSearches", "LuxCUDA", "Flux", "MethodOfLines"]
test = ["Aqua", "CUDA", "Flux", "LineSearches", "LuxCUDA", "LuxCore", "LuxLib", "MethodOfLines", "OptimizationOptimJL", "OrdinaryDiffEq", "Pkg", "Preferences", "SafeTestsets", "Test"]
6 changes: 3 additions & 3 deletions src/discretize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,20 +217,20 @@ function generate_training_sets(domains, dx, eqs, bcs, eltypeθ, dict_indvars::D

bcs_train_sets = map(bound_args) do bt
span = map(b -> get(dict_var_span, b, b), bt)
_set = adapt(eltypeθ,
_set = adapt(Array{eltypeθ},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not force an Array type, since that won't work in most scenarios. Just add a post-adapt convert.(eltypeθ, x)

hcat(vec(map(points -> collect(points), Iterators.product(span...)))...))
end

pde_vars = get_variables(eqs, dict_indvars, dict_depvars)
pde_args = get_argument(eqs, dict_indvars, dict_depvars)

pde_train_set = adapt(eltypeθ,
pde_train_set = adapt(Array{eltypeθ},
hcat(vec(map(points -> collect(points),
Iterators.product(bc_data...)))...))

pde_train_sets = map(pde_args) do bt
span = map(b -> get(dict_var_span_, b, b), bt)
_set = adapt(eltypeθ,
_set = adapt(Array{eltypeθ},
hcat(vec(map(points -> collect(points), Iterators.product(span...)))...))
end
[pde_train_sets, bcs_train_sets]
Expand Down
8 changes: 8 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
using Pkg
using SafeTestsets

# Run Lux in "safe-mode" with aggressive error checking
using Preferences

# TODO: `warn` is for debugging purposes. Change to `error` for best performance.
Preferences.set_preferences!("Lux", "eltype_mismatch_handling" => "warn")
Preferences.set_preferences!("LuxLib", "instability_check" => "warn")
Preferences.set_preferences!("LuxCore", "instability_check" => "warn")

const GROUP = get(ENV, "GROUP", "All")

const is_APPVEYOR = Sys.iswindows() && haskey(ENV, "APPVEYOR")
Expand Down
Loading