Commit 1b82388c authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis
Browse files

Fixes for benchmarks compilation issues

parent e3298851
......@@ -43,8 +43,8 @@
//| The fact that you are presently reading this means that you have had
//| knowledge of the CeCILL-C license and that you accept its terms.
//|
#include <iostream>
#include <chrono>
#include <iostream>
#include <limbo/limbo.hpp>
......@@ -57,7 +57,11 @@ struct Params {
BO_PARAM(bool, stats_enabled, false);
};
struct bayes_opt_boptimizer {
#if defined(LIMBO_DEF_HPOPT) || defined(BAYESOPT_DEF_HPOPT)
BO_PARAM(int, hp_period, 50);
#else
BO_PARAM(int, hp_period, -1);
#endif
};
struct stop_maxiterations {
BO_PARAM(int, iterations, 190);
......@@ -151,7 +155,6 @@ int main()
{
srand(time(NULL));
// limbo default parameters
#ifdef LIMBO_DEF
using Opt_t = bayes_opt::BOptimizer<Params>;
......@@ -194,13 +197,13 @@ int main()
#elif defined(ACQ_UCB)
using GP_t = model::GP<Params>;
using Acqui_t = acqui::UCB<Params, GP_t>;
using Opt_t = bayes_opt::BOptimizer<Params, acquifun<Acqui_t>> ;
using Opt_t = bayes_opt::BOptimizer<Params, acquifun<Acqui_t>>;
#elif defined(ACQ_EI)
using GP_t = model::GP<Params>;
using Acqui_t = acqui::EI<Params, GP_t>;
using Opt_t = bayes_opt::BOptimizer<Params, acquifun<Acqui_t>> ;
using Opt_t = bayes_opt::BOptimizer<Params, acquifun<Acqui_t>>;
#else
#error "Unknown variant in benchmark"
#error "Unknown variant in benchmark"
#endif
benchmark<Opt_t, BraninNormalized>("branin");
......
......@@ -46,36 +46,36 @@
#ifndef LIMBO_BAYES_OPT_BO_BASE_HPP
#define LIMBO_BAYES_OPT_BO_BASE_HPP
#include <vector>
#include <exception>
#include <iostream>
#include <limits>
#include <exception>
#include <vector>
// Quick hack for definition of 'I' in <complex.h>
#undef I
#include <boost/parameter.hpp>
#include <boost/fusion/include/vector.hpp>
#include <boost/fusion/include/accumulate.hpp>
#include <boost/fusion/include/for_each.hpp>
#include <boost/fusion/include/vector.hpp>
#include <boost/parameter.hpp>
#define BOOST_NO_SCOPED_ENUMS
#include <boost/filesystem.hpp>
#include <Eigen/Core>
// we need everything to have the defaults
#include <limbo/tools/macros.hpp>
#include <limbo/stop/chain_criteria.hpp>
#include <limbo/stop/max_iterations.hpp>
#include <limbo/stat/samples.hpp>
#include <limbo/stat/aggregated_observations.hpp>
#include <limbo/stat/console_summary.hpp>
#include <limbo/tools/sys.hpp>
#include <limbo/kernel/exp.hpp>
#include <limbo/acqui/ucb.hpp>
#include <limbo/init/random_sampling.hpp>
#include <limbo/kernel/exp.hpp>
#include <limbo/mean/data.hpp>
#include <limbo/model/gp.hpp>
#include <limbo/init/random_sampling.hpp>
#include <limbo/stat/aggregated_observations.hpp>
#include <limbo/stat/console_summary.hpp>
#include <limbo/stat/samples.hpp>
#include <limbo/stop/chain_criteria.hpp>
#include <limbo/stop/max_iterations.hpp>
#include <limbo/tools/macros.hpp>
#include <limbo/tools/math.hpp>
#include <limbo/tools/sys.hpp>
namespace limbo {
namespace defaults {
......
......@@ -138,7 +138,6 @@ namespace limbo {
template <typename StateFunction, typename AggregatorFunction = FirstElem>
void optimize(const StateFunction& sfun, const AggregatorFunction& afun = AggregatorFunction(), bool reset = true)
{
this->_init(sfun, afun, reset);
if (!this->_observations.empty())
......@@ -210,7 +209,7 @@ namespace limbo {
class A2 = boost::parameter::void_,
class A3 = boost::parameter::void_,
class A4 = boost::parameter::void_>
using BOptimizerHPOpt = BOptimizer<Params, A1, A2, A3, A4, modelfun<_default_hp::model_t<Params>>, acquifun<_default_hp::acqui_t<Params>>>;
using BOptimizerHPOpt = BOptimizer<Params, modelfun<_default_hp::model_t<Params>>, acquifun<_default_hp::acqui_t<Params>>, A1, A2, A3, A4>;
}
}
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment