From 2cad79a982fdd0170c58b60b22d27dddecfe54b1 Mon Sep 17 00:00:00 2001 From: Sathvik Bhagavan Date: Fri, 29 Dec 2023 08:07:52 +0000 Subject: [PATCH 1/3] build: use julia 1.10 for all subpackages and clean up some compats to standardize --- Project.toml | 2 +- lib/SurrogatesAbstractGPs/Project.toml | 4 ++-- lib/SurrogatesFlux/Project.toml | 6 +++--- lib/SurrogatesMOE/Project.toml | 8 ++++---- lib/SurrogatesPolyChaos/Project.toml | 4 ++-- lib/SurrogatesRandomForest/Project.toml | 2 +- lib/SurrogatesSVM/Project.toml | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Project.toml b/Project.toml index df00fbe85..788695968 100644 --- a/Project.toml +++ b/Project.toml @@ -19,7 +19,7 @@ Aqua = "0.8" Cubature = "1.5" Distributions = "0.25.71" ExtendableSparse = "1" -Flux = "0.13" +Flux = "0.14" ForwardDiff = "0.10.19" GLM = "1.5" IterativeSolvers = "0.9" diff --git a/lib/SurrogatesAbstractGPs/Project.toml b/lib/SurrogatesAbstractGPs/Project.toml index ea3a9f565..734dc72a1 100644 --- a/lib/SurrogatesAbstractGPs/Project.toml +++ b/lib/SurrogatesAbstractGPs/Project.toml @@ -9,8 +9,8 @@ Surrogates = "6fc51010-71bc-11e9-0e15-a3fcc6593c49" [compat] AbstractGPs = "0.5" -Surrogates = "6.0" -julia = "1.6" +Surrogates = "6" +julia = "1.10" [extras] SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" diff --git a/lib/SurrogatesFlux/Project.toml b/lib/SurrogatesFlux/Project.toml index 5bf7fe258..8fc1c5de7 100644 --- a/lib/SurrogatesFlux/Project.toml +++ b/lib/SurrogatesFlux/Project.toml @@ -8,9 +8,9 @@ Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" Surrogates = "6fc51010-71bc-11e9-0e15-a3fcc6593c49" [compat] -Flux = "0.13, 0.14" -Surrogates = "6.0.0" -julia = "1.6" +Flux = "0.14" +Surrogates = "6" +julia = "1.10" [extras] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/lib/SurrogatesMOE/Project.toml b/lib/SurrogatesMOE/Project.toml index b104613b3..7e6de3b84 100644 --- a/lib/SurrogatesMOE/Project.toml +++ b/lib/SurrogatesMOE/Project.toml @@ -8,27 +8,27 @@ Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" GaussianMixtures = "cc18c42c-b769-54ff-9e2a-b28141a64aae" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +Surrogates = "6fc51010-71bc-11e9-0e15-a3fcc6593c49" SurrogatesFlux = "4f55584b-dac4-4b1c-802a-b7c47b72cb4c" SurrogatesPolyChaos = "50679fc6-c85c-4a6e-ac63-dc3c8bd8cb1c" SurrogatesRandomForest = "3fee2672-df33-422b-aa65-d915eeac013a" -Surrogates = "6fc51010-71bc-11e9-0e15-a3fcc6593c49" XGBoost = "009559a3-9522-5dbb-924b-0b6ed2b22bb9" [compat] Distributions = "0.25.71" GaussianMixtures = "0.3.6" -julia = "1.6" -Surrogates = "6.0" +Surrogates = "6" SurrogatesFlux = "0.1.0" SurrogatesPolyChaos = "0.1.0" SurrogatesRandomForest = "0.1.0" XGBoost = "2" +julia = "1.10" [extras] Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" [targets] test = ["Flux", "Test", "SafeTestsets", "StableRNGs"] diff --git a/lib/SurrogatesPolyChaos/Project.toml b/lib/SurrogatesPolyChaos/Project.toml index fc34fd558..d40a93e39 100644 --- a/lib/SurrogatesPolyChaos/Project.toml +++ b/lib/SurrogatesPolyChaos/Project.toml @@ -9,8 +9,8 @@ Surrogates = "6fc51010-71bc-11e9-0e15-a3fcc6593c49" [compat] PolyChaos = "0.2" -Surrogates = "6.0" -julia = "1.6" +Surrogates = "6" +julia = "1.10" [extras] SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" diff --git a/lib/SurrogatesRandomForest/Project.toml b/lib/SurrogatesRandomForest/Project.toml index 88684cf09..b48b04fc4 100644 --- a/lib/SurrogatesRandomForest/Project.toml +++ b/lib/SurrogatesRandomForest/Project.toml @@ -10,7 +10,7 @@ XGBoost = "009559a3-9522-5dbb-924b-0b6ed2b22bb9" [compat] Surrogates = "6" XGBoost = "2" -julia = "1.6" +julia = "1.10" [extras] SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" diff --git a/lib/SurrogatesSVM/Project.toml b/lib/SurrogatesSVM/Project.toml index 6a028d016..788b92283 100644 --- a/lib/SurrogatesSVM/Project.toml +++ b/lib/SurrogatesSVM/Project.toml @@ -10,7 +10,7 @@ Surrogates = "6fc51010-71bc-11e9-0e15-a3fcc6593c49" [compat] LIBSVM = "0.8" Surrogates = "6" -julia = "1.6" +julia = "1.10" [extras] SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" From a1cab7740d5aebf638392e897e006f441cfa1d72 Mon Sep 17 00:00:00 2001 From: Sathvik Bhagavan Date: Fri, 29 Dec 2023 08:08:36 +0000 Subject: [PATCH 2/3] test(SurrogatesMOE): use a deterministic sampling to prevent spurious failures --- lib/SurrogatesMOE/test/runtests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SurrogatesMOE/test/runtests.jl b/lib/SurrogatesMOE/test/runtests.jl index f47ea8f63..43f9e8d03 100644 --- a/lib/SurrogatesMOE/test/runtests.jl +++ b/lib/SurrogatesMOE/test/runtests.jl @@ -116,7 +116,7 @@ end lb = [-1.0, -1.0] ub = [1.0, 1.0] n = 120 - x = sample(n, lb, ub, RandomSample()) + x = sample(n, lb, ub, LatinHypercubeSample()) y = discont_NDIM.(x) x_test = sample(10, lb, ub, GoldenSample()) @@ -184,7 +184,7 @@ end lb = [-1.0, -1.0] ub = [1.0, 1.0] n = 110 - x = sample(n, lb, ub, RandomSample()) + x = sample(n, lb, ub, LatinHypercubeSample()) y = discont_NDIM.(x) expert_types = [InverseDistanceStructure(p = 1.0), RadialBasisStructure(radial_function = linearRadial(), scale_factor = 1.0, From 43207792fb979d419deab4fc64d9a9f54c1fa6b0 Mon Sep 17 00:00:00 2001 From: Sathvik Bhagavan Date: Fri, 29 Dec 2023 08:18:21 +0000 Subject: [PATCH 3/3] chore: format --- src/Optimization.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Optimization.jl b/src/Optimization.jl index 82e0996f1..b7d7e3f8d 100755 --- a/src/Optimization.jl +++ b/src/Optimization.jl @@ -2045,7 +2045,8 @@ function surrogate_optimize(obj, rtea::RTEA, lb, ub, surrRTEAND::AbstractSurroga return pareto_set, pareto_front end -function surrogate_optimize(obj::Function, ::EI, lb::AbstractArray, ub::AbstractArray, krig, sample_type::SectionSample; +function surrogate_optimize(obj::Function, ::EI, lb::AbstractArray, ub::AbstractArray, krig, + sample_type::SectionSample; maxiters = 100, num_new_samples = 100) dtol = 1e-3 * norm(ub - lb) eps = 0.01