Skip to content

Commit

Permalink
fix: bump componentarrays version
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Jan 11, 2025
1 parent 34f9cf2 commit 80b00f0
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ ArrayInterface = "7.17.1"
CUDA = "5.3.2"
ChainRulesCore = "1.25"
Compat = "4.16"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
ConcreteStructs = "0.2.3"
DispatchDoctor = "0.4.12"
Enzyme = "0.13.28"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
ADTypes = "1.10"
Adapt = "4"
ChainRulesCore = "1.25"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
Documenter = "1.4"
DocumenterVitepress = "0.1.3"
Enzyme = "0.13.16"
Expand Down
2 changes: 1 addition & 1 deletion examples/Basics/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
ForwardDiff = "0.10"
Lux = "1"
Optimisers = "0.4.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/GravitationalWaveForm/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"

[compat]
CairoMakie = "0.12"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
LineSearches = "7"
Lux = "1"
Optimization = "4"
Expand Down
2 changes: 1 addition & 1 deletion examples/HyperNet/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
Lux = "1"
LuxCUDA = "0.3"
MLDatasets = "0.7"
Expand Down
24 changes: 14 additions & 10 deletions examples/HyperNet/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@ CUDA.allowscalar(false)
# ## Loading Datasets
function load_dataset(::Type{dset}, n_train::Union{Nothing, Int},
n_eval::Union{Nothing, Int}, batchsize::Int) where {dset}
if n_train === nothing
imgs, labels = dset(:train)
(; features, targets) = if n_train === nothing
tmp = dset(:train)
tmp[1:length(tmp)]
else
imgs, labels = dset(:train)[1:n_train]
dset(:train)[1:n_train]
end
x_train, y_train = reshape(imgs, 28, 28, 1, n_train), onehotbatch(labels, 0:9)
x_train, y_train = reshape(features, 28, 28, 1, :), onehotbatch(targets, 0:9)

if n_eval === nothing
imgs, labels = dset(:test)
(; features, targets) = if n_eval === nothing
tmp = dset(:test)
tmp[1:length(tmp)]
else
imgs, labels = dset(:test)[1:n_eval]
dset(:test)[1:n_eval]
end
x_test, y_test = reshape(imgs, 28, 28, 1, n_eval), onehotbatch(labels, 0:9)
x_test, y_test = reshape(features, 28, 28, 1, :), onehotbatch(targets, 0:9)

return (
DataLoader((x_train, y_train); batchsize=min(batchsize, n_train), shuffle=true),
DataLoader((x_test, y_test); batchsize=min(batchsize, n_eval), shuffle=false)
DataLoader(
(x_train, y_train); batchsize=min(batchsize, size(x_train, 4)), shuffle=true),
DataLoader(
(x_test, y_test); batchsize=min(batchsize, size(x_test, 4)), shuffle=false)
)
end

Expand Down
2 changes: 1 addition & 1 deletion examples/NeuralODE/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
Lux = "1"
LuxCUDA = "0.3"
MLDatasets = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion examples/OptimizationIntegration/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"

[compat]
CairoMakie = "0.12.10"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
Lux = "1"
MLUtils = "0.4.4"
Optimization = "4"
Expand Down
2 changes: 1 addition & 1 deletion lib/LuxLib/test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Aqua = "0.8.7"
BLISBLAS = "0.1"
BenchmarkTools = "1.5"
ChainRulesCore = "1.24"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
Enzyme = "0.13.16"
EnzymeCore = "0.8.8"
ExplicitImports = "1.9.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/LuxTestUtils/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ MLDataDevices = {path = "../MLDataDevices"}
ADTypes = "1.10"
ArrayInterface = "7.17.1"
ChainRulesCore = "1.24.0"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
DispatchDoctor = "0.4.12"
Enzyme = "0.13.16"
FiniteDiff = "2.23.1"
Expand Down
2 changes: 1 addition & 1 deletion lib/LuxTestUtils/test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
CUDA = "5"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
Hwloc = "3"
InteractiveUtils = "<0.0.1, 1"
MetaTesting = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion lib/MLDataDevices/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CUDA = "5.2"
ChainRules = "1.51"
ChainRulesCore = "1.23"
Compat = "4.16"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
FillArrays = "1"
Functors = "0.5"
GPUArrays = "10, 11"
Expand Down
2 changes: 1 addition & 1 deletion lib/MLDataDevices/test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Adapt = "4"
Aqua = "0.8.4"
ArrayInterface = "7.11"
ChainRulesTestUtils = "1.13.0"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
ExplicitImports = "1.9.0"
FillArrays = "1"
ForwardDiff = "0.10.36"
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ADTypes = "1.10"
Adapt = "4"
Aqua = "0.8.4"
ChainRulesCore = "1.24"
ComponentArrays = "0.15.18"
ComponentArrays = "0.15.22"
DispatchDoctor = "0.4.12"
Documenter = "1.4"
Enzyme = "0.13.16"
Expand Down

0 comments on commit 80b00f0

Please sign in to comment.