Commit 88f08111 authored by Jean-Baptiste Mouret's avatar Jean-Baptiste Mouret
Browse files

do not plot if no numpy/matplotlib

parent e3298851
...@@ -72,7 +72,6 @@ install: ...@@ -72,7 +72,6 @@ install:
- if [ "$TBB" = "ON" ]; then 'ci/install_tbb.sh' ; fi - if [ "$TBB" = "ON" ]; then 'ci/install_tbb.sh' ; fi
- if [ "$SFERES" = "ON" ]; then 'ci/install_sferes.sh' ; fi - if [ "$SFERES" = "ON" ]; then 'ci/install_sferes.sh' ; fi
# Change this to your needs # Change this to your needs
script: script:
- if [ "$SFERES" = "OFF" ]; then $PYTHON ./waf configure $LAPACKE ; else $PYTHON ./waf configure --sferes=$CI_HOME/sferes2 ; fi - if [ "$SFERES" = "OFF" ]; then $PYTHON ./waf configure $LAPACKE ; else $PYTHON ./waf configure --sferes=$CI_HOME/sferes2 ; fi
......
...@@ -2,12 +2,23 @@ ...@@ -2,12 +2,23 @@
# plot the results of the Bayesian Optimization benchmarks # plot the results of the Bayesian Optimization benchmarks
from glob import glob from glob import glob
from collections import defaultdict 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 = { params = {
'axes.labelsize' : 8, 'axes.labelsize' : 8,
...@@ -102,6 +113,9 @@ def plot(func_name, data): ...@@ -102,6 +113,9 @@ def plot(func_name, data):
def plot_all(): def plot_all():
if not plot_ok:
print_log('YELLOW', "No plot")
return
print('loading data...') print('loading data...')
data = load_data() data = load_data()
print('data loaded') print('data loaded')
......
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