robertfeldt / BlackBoxOptim.jl

Black-box optimization for Julia
Other
439 stars 56 forks source link

Getting ready for Julia 0.6? #68

Closed Ayush-iitkgp closed 7 years ago

Ayush-iitkgp commented 7 years ago

We are using BlackBoxOptim to optimize our cost function in DiffEqParamEstim.jl. We try to update our code to be compatible with the latest julia version 0.6+. Though the master supports julia 0.6+ but it throws lots of warnings when I import the library for the first time.

robertfeldt commented 7 years ago

I'm very glad to hear that you're using BlackBoxOptim. If you have more info/code about how you use it please share; maybe it can help me prioritise dev.

Yes, I'd like to fix the 0.6 issues but haven't made the move myself yet. Will investigate. If you have specific advice on what needs to be fixed (Compat should be able to fix it maybe?) that would be appreciated.

Ayush-iitkgp commented 7 years ago

This is how we are using BlackBoxOptim. @finmod exclusively wanted DiffEqParamEstim to provide support for BlackBoxOptim, he might have better examples to showcase.

I think Compat would be able to fix it though I have never tried it.

finmod commented 7 years ago

BlackBoxOptim is a powerful global optimizer that should be thrown real problems to chew on: wide bounds of random starting values in difficult IVPs or direct collocation method. The benchmarks should be the GN class of NLopt: GN_ESCH, GN_CRS2_LM and GN_ISRES as set up in the Lorenz_test.jl. So far, these algorithms fail before BBO. @robertfeldt

From BBO, the conversion of syntax to MPB would be nice, particularly if it produces gains in efficiency, but we have been able to test without it so far. The upgrade to Juliav0.6 is the other issue which may be alleviated by Compat. It remains true that BBO throws a lot of unsollicited deprecation messages and warnings.

robertfeldt commented 7 years ago

Thanks, I will update this soon around the time 0.6 is released. Is it scheduled for next week at JuliaCon?

"the conversion of syntax to MPB", can you expand what this means?

finmod commented 7 years ago

@ChrisRackauckas Can you answer this point on MathProgBase?

Basically, it is a standardized syntax that looks like this:

opt = Opt(:GN_ESCH, 1) min_objective!(opt, obj.cost_function2) lower_bounds!(opt,[0.0]) upper_bounds!(opt,[5.0]) xtol_rel!(opt,1e-3) maxeval!(opt, 10000) (minf,minx,ret) = NLopt.optimize(opt,[1.3]) @test minx[1] ≈ 1.5 atol=1e-1

where you replace NLopt by BBO.

robertfeldt commented 7 years ago

Ah ok, at least as soon as 0.6 is out I will start fixing 0.6 issues and then see if I can add a MPB interface. I will copy the NLOpt one and build from that. Last time I checked BBO did not handle the xtol and ftol etc stopping criteria the same way which might introduce some problems but will see if I can update.

ChrisRackauckas commented 7 years ago

Thanks, I will update this soon around the time 0.6 is released. Is it scheduled for next week at JuliaCon?

No schedule, and it'll probably be late.

robertfeldt commented 7 years ago

Since 0.6 is out I started to fix deprecations and warnings etc on a new branch:

https://github.com/robertfeldt/BlackBoxOptim.jl/tree/julia06_nowarnings

There are a few errors now when running test suite though so will have to investigate in more detail.

robertfeldt commented 7 years ago

Most 0.6 deprecation warnings are now fixed on master branch. However, fixing inner ctor for the new "where T" type syntax would mean dropping 0.5 support so we are holding off this change for some time more.