Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
88f08111
Commit
88f08111
authored
Jul 06, 2017
by
Jean-Baptiste Mouret
Browse files
do not plot if no numpy/matplotlib
parent
e3298851
Changes
2
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
88f08111
...
...
@@ -72,7 +72,6 @@ install:
-
if [ "$TBB" = "ON" ]; then 'ci/install_tbb.sh' ; fi
-
if [ "$SFERES" = "ON" ]; then 'ci/install_sferes.sh' ; fi
# Change this to your needs
script
:
-
if [ "$SFERES" = "OFF" ]; then $PYTHON ./waf configure $LAPACKE ; else $PYTHON ./waf configure --sferes=$CI_HOME/sferes2 ; fi
...
...
waf_tools/plot_bo_benchmarks.py
View file @
88f08111
...
...
@@ -2,12 +2,23 @@
# plot the results of the Bayesian Optimization benchmarks
from
glob
import
glob
from
collections
import
defaultdict
import
numpy
as
np
from
pylab
import
*
import
brewer2mpl
bmap
=
brewer2mpl
.
get_map
(
'Set2'
,
'qualitative'
,
8
)
colors
=
bmap
.
mpl_colors
try
:
from
waflib
import
Logs
def
print_log
(
c
,
s
):
Logs
.
pprint
(
c
,
s
)
except
:
# not in waf
def
print_log
(
c
,
s
):
print
(
s
)
try
:
import
numpy
as
np
from
pylab
import
*
import
brewer2mpl
bmap
=
brewer2mpl
.
get_map
(
'Set2'
,
'qualitative'
,
8
)
colors
=
bmap
.
mpl_colors
plot_ok
=
True
except
:
plot_ok
=
False
Logs
.
pprint
(
'YELLOW'
,
'WARNING: numpy/matplotlib not found: no plot of the BO benchmark results'
)
params
=
{
'axes.labelsize'
:
8
,
...
...
@@ -102,6 +113,9 @@ def plot(func_name, data):
def
plot_all
():
if
not
plot_ok
:
print_log
(
'YELLOW'
,
"No plot"
)
return
print
(
'loading data...'
)
data
=
load_data
()
print
(
'data loaded'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment