jbrea / BayesianOptimization.jl

Bayesian optimization for Julia
Other
90 stars 17 forks source link

ERROR: UndefVarError: GP.bounds not defined #1

Closed ngphuoc closed 5 years ago

ngphuoc commented 6 years ago

Hi, thanks for the package!

I tried to run the example and got the following error:

julia> result = boptimize!(opt)
ERROR: UndefVarError: bounds not defined
Stacktrace:
 [1] #optimizemodel!#32(::Bool, ::Bool, ::Bool, ::Bool, ::Nothing, ::Array{Array{Int64,1},1}, ::Array{Int64,1}, ::Symbol, ::Int64, ::typeof(BayesianOptimization.optimizemodel!), ::GPE{ElasticArrays.ElasticArray{Float64,2,1},ElasticArrays.ElasticArray{Float64,1,0},MeanConst,SEArd,ElasticPDMats.ElasticPDMat{Float64,Array{Float64,2}},GaussianProcesses.StationaryARDData{ElasticPDMats.AllElasticArray{Float64,3}}}) at /home/ngphuoc/.julia/dev/BayesianOptimization/src/models/gp.jl:26
 [2] #optimizemodel! at ./none:0 [inlined]
 [3] optimizemodel! at /home/ngphuoc/.julia/dev/BayesianOptimization/src/BayesianOptimization.jl:45 [inlined]
 [4] macro expansion at ./util.jl:213 [inlined]
 [5] macro expansion at ./util.jl:212 [inlined]
 [6] initialise_model!(::BOpt{typeof(f),GPE{ElasticArrays.ElasticArray{Float64,2,1},ElasticArrays.ElasticArray{Float64,1,0},MeanConst,SEArd,ElasticPDMats.ElasticPDMat{Float64,Array{Float64,2}},GaussianProcesses.StationaryARDData{ElasticPDMats.AllElasticArray{Float64,3}}},ExpectedImprovement,MLGPOptimizer{NamedTuple{(:noisebounds, :kernbounds, :maxeval),Tuple{Array{Int64,1},Array{Array{Int64,1},1},Int64}}}}) at /home/ngphuoc/.julia/dev/BayesianOptimization/src/BayesianOptimization.jl:127
 [7] boptimize!(::BOpt{typeof(f),GPE{ElasticArrays.ElasticArray{Float64,2,1},ElasticArrays.ElasticArray{Float64,1,0},MeanConst,SEArd,ElasticPDMats.ElasticPDMat{Float64,Array{Float64,2}},GaussianProcesses.StationaryARDData{ElasticPDMats.AllElasticArray{Float64,3}}},ExpectedImprovement,MLGPOptimizer{NamedTuple{(:noisebounds, :kernbounds, :maxeval),Tuple{Array{Int64,1},Array{Array{Int64,1},1},Int64}}}}) at /home/ngphuoc/.julia/dev/BayesianOptimization/src/BayesianOptimization.jl:144
 [8] top-level scope at none:0
jbrea commented 6 years ago

Hi @ngphuoc

Thanks for the interest. GP.bounds is currently defined in this PR. To try BayesianOptimization you could try in the julia package REPL: add https://github.com/jbrea/GaussianProcesses#constraint_optimiser or pull that PR. As soon as there is a new tagged version of GaussianProcesses, it will be easier to get BayesianOptimization running :smile:.

ngphuoc commented 5 years ago

It can run now! Thanks :)