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

Problem with Hyperoptim.jl #146

Closed
bdas123 opened this issue Jul 15, 2022 · 5 comments
Closed

Problem with Hyperoptim.jl #146

bdas123 opened this issue Jul 15, 2022 · 5 comments

Comments

@bdas123
Copy link

bdas123 commented Jul 15, 2022

Here is a snippet of my code.

model = Model(calc_sse)
addvar!(model, zeros(540), zeros(540).+100, init = x0)
alg = HyperoptAlg(NLoptAlg(:LD_MMA))
options = HyperoptOptions(sub_options = NLoptOptions(ftol_rel = 1e-2), sampler = GPSampler())
@time result = optimize(model, alg, x0, options = options)

When I run it, I get the following error:

The function Base.propertynames was overloaded for type Hyperopt.Hyperoptimizer{Hyperopt.GPSampler, NonconvexMultistart.var"#3#8"{Hyperopt.GPSampler, NonconvexNLopt.NLoptWorkspace{NonconvexCore.VecModel{NonconvexCore.Objective{NonconvexCore.var"#147#149"{typeof(calc_sse), NonconvexCore.Unflatten{Tuple{Vector{Float64}}, NonconvexCore.var"#unflatten_to_Tuple#71"{Tuple{Int64}, Tuple{Int64}, Tuple{typeof(identity)}}}}, Base.RefValue{Float64}, Set{Symbol}}, NonconvexCore.VectorOfFunctions{Vector{NonconvexCore.EqConstraint}}, NonconvexCore.VectorOfFunctions{Vector{NonconvexCore.IneqConstraint}}, NonconvexCore.VectorOfFunctions{Vector{NonconvexCore.SDConstraint}}, Vector{Float64}, Vector{Float64}, Vector{Float64}}, NLopt.Opt, Vector{Float64}, NLoptOptions{NamedTuple{(:suboptions, :ftol_rel, :ftol_abs, :xtol_rel, :xtol_abs), Tuple{NLoptOptions{NamedTuple{(), Tuple{}}}, Float64, Float64, Float64, Float64}}}, NLoptAlg{Nothing}, Base.RefValue{Int64}}, HyperoptOptions{NLoptOptions{NamedTuple{(:suboptions, :ftol_rel, :ftol_abs, :xtol_rel, :xtol_abs), Tuple{NLoptOptions{NamedTuple{(), Tuple{}}}, Float64, Float64, Float64, Float64}}}, Nothing, Nothing, Int64, Int64, Hyperopt.GPSampler, Float64, Bool}}}.
Please make sure the following methods are also overloaded for this type:
ConstructionBase.setproperties
ConstructionBase.getproperties # optional in VERSION >= julia v1.

@mohamed82008
Copy link
Member

what versions of packages are you using, please print the result of ]st in the REPL

@bdas123
Copy link
Author

bdas123 commented Jul 15, 2022

Probably more than you asked for, but here you go!

[6e4b80f9] BenchmarkTools v1.3.1
[336ed68f] CSV v0.10.3
[d360d2e6] ChainRulesCore v1.15.0
[cdddcdb0] ChainRulesTestUtils v1.8.1
[d38c429a] Contour v0.5.7
[a93c6f00] DataFrames v1.3.4
[f6369f11] ForwardDiff v0.10.30
[28b8d3ca] GR v0.64.4
[a75be94c] GalacticOptim v3.4.0
[7073ff75] IJulia v1.23.2
[b6b21f68] Ipopt v1.0.2
[4076af6c] JuMP v1.1.0
[76087f3c] NLopt v0.6.5
[01bcebdf] Nonconvex v1.0.3
[bf347577] NonconvexIpopt v0.1.4
[11b12826] NonconvexMultistart v0.1.1
[b43a31b8] NonconvexNLopt v0.1.5
[429524aa] Optim v1.7.0
[7f7a1694] Optimization v3.6.0
[3e6eede4] OptimizationBBO v0.1.0
[36348300] OptimizationOptimJL v0.1.1
[eadc2687] Pandas v1.5.3
[f0f68f2c] PlotlyJS v0.18.8
[91a5bcdd] Plots v1.31.1
[d330b81b] PyPlot v2.10.0
[ebc72ef8] SciPy v0.1.1
[bd369af6] Tables v1.7.0
[1e6cf692] TestEnv v1.7.3
[0f1e0344] WebIO v0.8.18
[e88e6eb3] Zygote v0.6.40
[37e2e46d] LinearAlgebra

@mohamed82008
Copy link
Member

Try ]add [email protected]. Should be fixed now.

@mohamed82008
Copy link
Member

Since tests pass in the repo, I am fairly confident this issue is fixed now with the latest release of NonconvexMultistart. Please open another issue if you have another problem.

@bdas123
Copy link
Author

bdas123 commented Jul 15, 2022

It works, thank you for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants