From 0888214e9fae1f2b7b14e1a2c7fca97009d3e780 Mon Sep 17 00:00:00 2001 From: Antoine Cully Date: Mon, 24 Oct 2016 14:11:37 +0100 Subject: [PATCH 1/2] Minor fix in quick start and create example --- docs/tutorials/quick_start.rst | 5 +++++ waf_tools/limbo.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/quick_start.rst b/docs/tutorials/quick_start.rst index edcc178726..38e5c6c89b 100644 --- a/docs/tutorials/quick_start.rst +++ b/docs/tutorials/quick_start.rst @@ -35,6 +35,7 @@ For Ubuntu / Debian: ./configure -with-cxx --enable-shared --without-python --without-matlab --without-octave sudo make install sudo ldconfig + cd .. For OSX: :: @@ -43,6 +44,7 @@ For OSX: tar -zxvf nlopt-2.4.2.tar.gz && cd nlopt-2.4.2 ./configure --with-cxx --enable-shared --without-python --without-matlab --without-octave sudo make install + cd .. For more options and troubleshooting, see the :ref:`Compilation tutorial `. @@ -50,6 +52,9 @@ For more options and troubleshooting, see the :ref:`Compilation tutorial = 0 else '' - cpp_params['BAYES_OPT_BOBASE_STATS_ENABLED'] = '' if opt.bayes_opt_bobase_stats_enabled else ' BO_PARAM(bool, stats_enabled, false);\n ' + cpp_params['BAYES_OPT_BOBASE_STATS_ENABLED'] = ' BO_PARAM(bool, stats_enabled, false);\n ' if opt.bayes_opt_bobase_stats_disabled else '' cpp_params['INIT_RANDOMSAMPLING_SAMPLES'] = ' BO_PARAM(int, samples, ' + str(opt.init_randomsampling_samples) + ');\n ' if opt.init_randomsampling_samples and opt.init_randomsampling_samples > 0 else '' cpp_params['STOP_MAXITERATIONS_ITERATIONS'] = ' BO_PARAM(int, iterations, ' + str(opt.stop_maxiterations_iterations) + ');\n ' if opt.stop_maxiterations_iterations and opt.stop_maxiterations_iterations > 0 else '' From 1a6f8aa84f7fc825aef2d02eb0dff9d6f298cd50 Mon Sep 17 00:00:00 2001 From: Antoine Cully Date: Mon, 24 Oct 2016 14:16:44 +0100 Subject: [PATCH 2/2] make variable name consistent --- waf_tools/exp_template.cpp | 2 +- waf_tools/limbo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/waf_tools/exp_template.cpp b/waf_tools/exp_template.cpp index 7f0a67d419..6fc5a16864 100644 --- a/waf_tools/exp_template.cpp +++ b/waf_tools/exp_template.cpp @@ -26,7 +26,7 @@ struct Params { #endif struct bayes_opt_bobase : public defaults::bayes_opt_bobase { - @BAYES_OPT_BOBASE_STATS_ENABLED + @BAYES_OPT_BOBASE_STATS_DISABLED }; struct kernel_exp : public defaults::kernel_exp { diff --git a/waf_tools/limbo.py b/waf_tools/limbo.py index a02576c446..59e210d376 100644 --- a/waf_tools/limbo.py +++ b/waf_tools/limbo.py @@ -117,7 +117,7 @@ def create_exp(name, opt): cpp_params = {} cpp_params['BAYES_OPT_BOPTIMIZER_NOISE'] = ' BO_PARAM(double, noise, ' + str(opt.bayes_opt_boptimizer_noise) + ');\n ' if opt.bayes_opt_boptimizer_noise and opt.bayes_opt_boptimizer_noise >= 0 else '' - cpp_params['BAYES_OPT_BOBASE_STATS_ENABLED'] = ' BO_PARAM(bool, stats_enabled, false);\n ' if opt.bayes_opt_bobase_stats_disabled else '' + cpp_params['BAYES_OPT_BOBASE_STATS_DISABLED'] = ' BO_PARAM(bool, stats_enabled, false);\n ' if opt.bayes_opt_bobase_stats_disabled else '' cpp_params['INIT_RANDOMSAMPLING_SAMPLES'] = ' BO_PARAM(int, samples, ' + str(opt.init_randomsampling_samples) + ');\n ' if opt.init_randomsampling_samples and opt.init_randomsampling_samples > 0 else '' cpp_params['STOP_MAXITERATIONS_ITERATIONS'] = ' BO_PARAM(int, iterations, ' + str(opt.stop_maxiterations_iterations) + ');\n ' if opt.stop_maxiterations_iterations and opt.stop_maxiterations_iterations > 0 else ''