Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge development into master for release 2.3.1 #1888

Merged
merged 39 commits into from
May 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2be4dcf
java build fix: include path and java 10 support (javah deprecated)
Mar 24, 2018
f00c56b
respect JAVA_HOME or JDK_HOME envs
Apr 18, 2018
cc19d92
empty envs fix
Apr 18, 2018
c19a05c
dirname -> basename fix
Apr 18, 2018
cd60f2c
Merge pull request #1864 from numbbo/master
brockho Mar 15, 2019
41bffe8
added zenodo batch to readme
nikohansen Mar 15, 2019
d83cbb7
Update README.md
nikohansen Mar 15, 2019
b7fea8c
refer to example_experiment2.py in readme
nikohansen Mar 15, 2019
5c7d24e
Update LS latex template and reference
kostasvar Mar 16, 2019
128d190
Merge pull request #1866 from kostasvar/development
brockho Mar 19, 2019
2a6e8ee
Modified comments to show that the extended bi-objective suite is not…
ttusar Mar 22, 2019
3a2bde9
Merge pull request #1876 from ttusar/development
brockho Mar 22, 2019
65fcd76
split `with InfolderGoneWithTheWind()` into smaller pieces to hopeful…
brockho Mar 23, 2019
f6f783d
Merge branch 'development' of https://github.com/numbbo/coco into fix…
brockho Mar 23, 2019
f6a1acc
added year as filter proposal in example_experiment2.py
nikohansen Mar 23, 2019
dc578a9
moving solver to add part up in example_experiment2.py
nikohansen Mar 26, 2019
1a3553c
change default name of archiving definition file
nikohansen Mar 26, 2019
23a99fe
Update release-howto.md
nikohansen Apr 3, 2019
ae6ada7
fix bug finding '.t' in filename to extract
nikohansen Apr 4, 2019
c64e5b7
Introduced a filter of data sets to the Testbed class(es) to allow to…
brockho Apr 12, 2019
5375183
added the missing cocoProblemGetLargestFValuesOfInterest.m file of th…
brockho Apr 12, 2019
6ff3858
Merge branch 'development' of https://github.com/numbbo/coco into pp-…
brockho Apr 12, 2019
66c8ae4
created a new `goto-dimension` attribute of the Testbed class to spec…
brockho Apr 13, 2019
024b0ec
removed unwanted prints
brockho Apr 19, 2019
576f37e
Testbed.instances_are_uniform=False prevents simulated restarts
nikohansen Apr 23, 2019
5cb2697
correction
brockho Apr 24, 2019
bc24308
Merge branch 'development' of https://github.com/numbbo/coco into pp-…
brockho Apr 24, 2019
71c37fc
shortened some of the bbob-biobj(-ext) function names to reduce the e…
brockho Apr 27, 2019
1b73b10
removed unnecessary print
brockho Apr 27, 2019
2395f9d
change to Java 11 on CircleCI to (hopefully) pass the tests again
brockho Apr 30, 2019
398ef0c
Merge branch 'fix_java_jni' of https://github.com/pszynk/coco into pp…
brockho Apr 30, 2019
8b9c7f8
corrected merge of pull request that had still some cmocka parts in it
brockho Apr 30, 2019
f72e3b0
remove the check for JAVA_HOME
brockho Apr 30, 2019
6da4e06
no interactive installation under linux for Octave tests
brockho Apr 30, 2019
4f16418
correction in filter method when suite is not biobjective
brockho Apr 30, 2019
bedac01
Merge pull request #1887 from brockho/pp-bbobbiobjext-2
brockho Apr 30, 2019
0ad91d8
Merge branch 'development' of https://github.com/numbbo/coco into dev…
brockho Apr 30, 2019
4115569
Merge pull request #1889 from brockho/development
brockho Apr 30, 2019
5692bdb
Merge branch 'master' into development
brockho Apr 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- run:
name: Install octave for octave tests
command: |
apt-get install -y liboctave-dev
DEBIAN_FRONTEND=noninteractive apt-get install -y liboctave-dev
updatedb
- run:
name: Run coco octave tests
Expand All @@ -72,7 +72,7 @@ jobs:
- run:
name: Install jdk for java tests
command: |
apt-get install -y openjdk-8-jdk
apt-get install -y openjdk-11-jdk
updatedb
- run:
name: Run coco octave tests
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
- run:
name: Install jdk for java tests
command: |
apt-get install -y openjdk-8-jdk
apt-get install -y openjdk-11-jdk
updatedb
- run:
name: Run coco java tests
Expand Down
2 changes: 1 addition & 1 deletion code-experiments/build/c/example_experiment.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int main(void) {
* example one of the following:
* bbob 24 unconstrained noiseless single-objective functions
* bbob-biobj 55 unconstrained noiseless bi-objective functions
* bbob-biobj-ext 92 unconstrained noiseless bi-objective functions
* [bbob-biobj-ext 92 unconstrained noiseless bi-objective functions]
* [bbob-constrained* 48 constrained noiseless single-objective functions]
* bbob-largescale 24 unconstrained noiseless single-objective functions in large dimension
* bbob-mixint 24 unconstrained noiseless single-objective functions with mixed-integer variables
Expand Down
2 changes: 1 addition & 1 deletion code-experiments/build/java/ExampleExperiment.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void main(String[] args) {
*
* bbob 24 unconstrained noiseless single-objective functions
* bbob-biobj 55 unconstrained noiseless bi-objective functions
* bbob-biobj-ext 92 unconstrained noiseless bi-objective functions
* [bbob-biobj-ext 92 unconstrained noiseless bi-objective functions]
* bbob-largescale 24 unconstrained noiseless single-objective functions in large dimension
* [bbob-constrained* 48 constrained noiseless single-objective functions]
* bbob-mixint 24 unconstrained noiseless single-objective functions with mixed-integer variables
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
% For multi-objective problems, returns a vector of largest values of
% interest in each objective. Currently, this equals the nadir point.
% For single-objective problems it raises an error..
%
% Parameters:
% problem The given problem.
function ub = cocoProblemGetLargestFValuesOfInterest(problem)
ub = cocoCall('cocoProblemGetLargestFValuesOfInterest', problem);
2 changes: 1 addition & 1 deletion code-experiments/build/matlab/exampleexperiment.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
%
% bbob 24 unconstrained noiseless single-objective functions
% bbob-biobj 55 unconstrained noiseless bi-objective functions
% bbob-biobj-ext 92 unconstrained noiseless bi-objective functions
% [bbob-biobj-ext 92 unconstrained noiseless bi-objective functions]
% bbob-largescale 24 unconstrained noiseless single-objective functions in large dimensions
% [bbob-constrained* 48 constrained noiseless single-objective functions]
% bbob-mixint 24 unconstrained noiseless single-objective functions with mixed-integer variables
Expand Down
13 changes: 7 additions & 6 deletions code-experiments/build/python/example_experiment2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
features restarts, timings and recording termination conditions.

To benchmark a different solver, `fmin` must be re-assigned and another
`elif` block added around line 136 to account for the solver-specific
`elif` block added around line 119 to account for the solver-specific
call.

When calling the script, previously assigned variables can be re-assigned
Expand Down Expand Up @@ -38,7 +38,7 @@
import time # output some timings per evaluation
from collections import defaultdict
import os, webbrowser # to show post-processed results in the browser
import numpy as np # for np.median
import numpy as np # for median, zeros, random, asarray
import cocoex # experimentation module
try: import cocopp # post-processing module
except: pass
Expand All @@ -63,6 +63,7 @@ def random_search(f, lbounds, ubounds, evals):
suite_name = "bbob" # see cocoex.known_suite_names
budget_multiplier = 2 # times dimension, increase to 10, 100, ...
suite_filter_options = (# "dimensions: 2,3,5,10,20 " + # skip dimension 40
# "year:2019 " + # select instances by year
# "instance_indices: 1-5 " + # relative to suite instances
"") # without filtering a suite has instance_indices 1-15
batches = 1 # number of batches, batch=3/32 works to set both, current_batch and batches
Expand Down Expand Up @@ -114,8 +115,10 @@ def random_search(f, lbounds, ubounds, evals):
while evalsleft() > 0 and not problem.final_target_hit:
irestart += 1

# here we assume that `fmin` evaluates the final/returned solution:
if fmin is scipy.optimize.fmin:
# here we assume that `fmin` evaluates the final/returned solution
if 11 < 3: # add solver to investigate here
pass
elif fmin is scipy.optimize.fmin:
output = fmin(problem, propose_x0(), maxfun=evalsleft(), disp=False, full_output=True)
stoppings[problem.index].append(output[4])
elif fmin is scipy.optimize.fmin_slsqp:
Expand All @@ -132,8 +135,6 @@ def random_search(f, lbounds, ubounds, evals):
elif fmin is scipy.optimize.fmin_cobyla:
fmin(problem, propose_x0(), lambda x: -problem.constraint(x), maxfun=evalsleft(),
disp=0, rhoend=1e-9)
else: # add another solver here
raise NotImplementedError

timings[problem.dimension].append((time.time() - time1) / problem.evaluations
if problem.evaluations else 0)
Expand Down
8 changes: 8 additions & 0 deletions code-experiments/tools/cocoutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import sys
import os
from distutils.spawn import find_executable
from shutil import copyfile, copytree, rmtree
from subprocess import CalledProcessError, call, STDOUT

Expand Down Expand Up @@ -225,3 +226,10 @@ def expand_file(source, destination, dictionary):
content = Template(fd.read())
with open(destination, "w") as outfd:
outfd.write(content.safe_substitute(dictionary))


def executable_path(name):
p = find_executable(name)
if p:
return os.path.realpath(p)

6 changes: 3 additions & 3 deletions code-postprocessing/cocopp/archiving.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
publish it together with the URL, such that everyone can use the archive
on the fly like

>>> remote_def = 'http://my-coco-online-archive/archive_definition.txt'
>>> remote_def = 'http://my-coco-online-archive/coco_archive_definition.txt'
>>> new_archive = create_from_remote('~/.cocopp/new-archives/unique-name',
... remote_def) # doctest:+SKIP

Expand Down Expand Up @@ -59,7 +59,7 @@
except ImportError:
from urllib import urlretrieve

default_definition_filename = 'archive_definition.txt'
default_definition_filename = 'coco_archive_definition.txt'


def _abs_path(path):
Expand Down Expand Up @@ -133,7 +133,7 @@ def read_definition_file(local_path_or_definition_file):
return ast.literal_eval(file_.read())

def create_from_remote(local_path, url_definition_file):
"""copy a definition file from url to ``local_path/archive_definition.txt``.
"""copy a definition file from url to ``local_path/coco_archive_definition.txt``.

`local_path` is the storage location and should (better) be empty.
It is created if it does not exist.
Expand Down
50 changes: 25 additions & 25 deletions code-postprocessing/cocopp/bbob-biobj-benchmarkshortinfos.txt
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
1 Sphere/Sphere
2 Sphere/sep. Ellipsoid
3 Sphere/Attractive sector
3 Sphere/Attr. sector
4 Sphere/Rosenbrock
5 Sphere/Sharp ridge
6 Sphere/Different Powers
7 Sphere/Rastrigin
8 Sphere/Schaffer F7
9 Sphere/Schwefel
10 Sphere/Gallagher 101
11 sep. Ellipsoid/sep. Ellipsoid
12 sep. Ellipsoid/Attractive sector
11 sep. Ellipsoid/sep. Elli.
12 sep. Ellipsoid/Attr. sector
13 sep. Ellipsoid/Rosenbrock
14 sep. Ellipsoid/Sharp ridge
15 sep. Ellipsoid/Different Powers
15 sep. Ellipsoid/Diff. Powers
16 sep. Ellipsoid/Rastrigin
17 sep. Ellipsoid/Schaffer F7
18 sep. Ellipsoid/Schwefel
19 sep. Ellipsoid/Gallagher 101
20 Attractive sector/Attractive sector
21 Attractive sector/Rosenbrock
22 Attractive sector/Sharp ridge
23 Attractive sector/Different Powers
24 Attractive sector/Rastrigin
25 Attractive sector/Schaffer F7
26 Attractive sector/Schwefel
27 Attractive sector/Gallagher 101
19 sep. Elli./Gallagher 101
20 Attr. sector/Attr. sector
21 Attr. sector/Rosenbrock
22 Attr. sector/Sharp ridge
23 Attr. sector/Diff. Powers
24 Attr. sector/Rastrigin
25 Attr. sector/Schaffer F7
26 Attr. sector/Schwefel
27 Attr. sector/Gallagher 101
28 Rosenbrock/Rosenbrock
29 Rosenbrock/Sharp ridge
30 Rosenbrock/Different Powers
30 Rosenbrock/Diff. Powers
31 Rosenbrock/Rastrigin
32 Rosenbrock/Schaffer F7
33 Rosenbrock/Schwefel
34 Rosenbrock/Gallagher 101
35 Sharp ridge/Sharp ridge
36 Sharp ridge/Different Powers
36 Sharp ridge/Diff. Powers
37 Sharp ridge/Rastrigin
38 Sharp ridge/Schaffer F7
39 Sharp ridge/Schwefel
40 Sharp ridge/Gallagher 101
41 Different Powers/Different Powers
42 Different Powers/Rastrigin
43 Different Powers/Schaffer F7
44 Different Powers/Schwefel
45 Different Powers/Gallagher 101
41 Diff. Powers/Diff. Powers
42 Diff. Powers/Rastrigin
43 Diff. Powers/Schaffer F7
44 Diff. Powers/Schwefel
45 Diff. Powers/Gallagher 101
46 Rastrigin/Rastrigin
47 Rastrigin/Schaffer F7
48 Rastrigin/Schwefel
49 Rastrigin/Gallagher 101
50 Schaffer F7/Schaffer F7
51 Schaffer F7/Schwefel
52 Schaffer F7/Gallagher 101
52 Schaffer F7/Gallagh. 101
53 Schwefel/Schwefel
54 Schwefel/Gallagher 101
55 Gallagher 101/Gallagher 101
55 Gallagher 101/Gallagh. 101
56 Sphere/sep. Rastrigin
57 Sphere/Skew Rastrigin-Bueche
58 Sphere/Linear slope
Expand All @@ -70,12 +70,12 @@
70 Ellipsoid/Discus
71 Ellipsoid/Bent cigar
72 Ellipsoid/Sharp ridge
73 Ellipsoid/Different Powers
73 Ellipsoid/Diff. Powers
74 Discus/Bent cigar
75 Discus/Sharp ridge
76 Discus/Different Powers
76 Discus/Diff. Powers
77 Bent cigar/Sharp ridge
78 Bent cigar/Different Powers
78 Bent cigar/Diff. Powers
79 Rastrigin/Schaffer F7 cond 1000
80 Rastrigin/Griewank-Rosenbrock
81 Schaffer F7/Schaffer F7 cond 1000
Expand Down
34 changes: 26 additions & 8 deletions code-postprocessing/cocopp/compall/pprldmany.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,19 @@ def plot(dsList, targets=None, craftingeffort=0., **kwargs):
evals = entry.detEvals([t])[0]
runlengthsucc = evals[np.isnan(evals) == False] / divisor
runlengthunsucc = entry.maxevals[np.isnan(evals)] / divisor
if len(runlengthsucc) > 0:
x = toolsstats.drawSP(runlengthsucc, runlengthunsucc,
percentiles=[50],
samplesize=perfprofsamplesize)[1]
if len(runlengthsucc) > 0: # else x == [inf, inf,...]
if testbedsettings.current_testbed.instances_are_uniform:
x = toolsstats.drawSP(runlengthsucc, runlengthunsucc,
percentiles=[50],
samplesize=perfprofsamplesize)[1]
else:
nruns = len(runlengthsucc) + len(runlengthunsucc)
if perfprofsamplesize % nruns:
warnings.warn("without simulated restarts nbsamples=%d"
" should be a multiple of nbruns=%d"
% (perfprofsamplesize, nruns))
idx = toolsstats.randint_derandomized(nruns, size=perfprofsamplesize)
x = np.hstack((runlengthsucc, len(runlengthunsucc) * [np.inf]))[idx]
data.extend(x)
maxevals.extend(runlengthunsucc)

Expand Down Expand Up @@ -636,10 +645,19 @@ def main(dictAlg, order=None, outputdir='.', info='default',
assert entry.dim == dim
runlengthsucc = evals[np.isnan(evals) == False] / divisor
runlengthunsucc = entry.maxevals[np.isnan(evals)] / divisor
if len(runlengthsucc) > 0:
x = toolsstats.drawSP(runlengthsucc, runlengthunsucc,
percentiles=[50],
samplesize=perfprofsamplesize)[1]
if len(runlengthsucc) > 0: # else x == [inf, inf,...]
if testbedsettings.current_testbed.instances_are_uniform:
x = toolsstats.drawSP(runlengthsucc, runlengthunsucc,
percentiles=[50],
samplesize=perfprofsamplesize)[1]
else:
nruns = len(runlengthsucc) + len(runlengthunsucc)
if perfprofsamplesize % nruns:
warnings.warn("without simulated restarts nbsamples=%d"
" should be a multiple of nbruns=%d"
% (perfprofsamplesize, nruns))
idx = toolsstats.randint_derandomized(nruns, size=perfprofsamplesize)
x = np.hstack((runlengthsucc, len(runlengthunsucc) * [np.inf]))[idx]
except (KeyError, IndexError):
# set_trace()
warntxt = ('Data for algorithm %s on function %d in %d-D '
Expand Down
2 changes: 1 addition & 1 deletion code-postprocessing/cocopp/findfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def get_directory(directory, extract_files):
print(' archive extracted to folder', dir_name, '...')
directory = dir_name
else: # i.e. either directory or .tar or zipped .tar
head, tail = os.path.split(directory[:directory.find('.t')])
head, tail = os.path.split(directory[:directory.rfind('.t')])
dir_name = os.path.join(head, genericsettings.extraction_folder_prefix + tail)
# extract only if extracted folder does not exist yet or if it was
# extracted earlier than last change of archive:
Expand Down
6 changes: 3 additions & 3 deletions code-postprocessing/cocopp/ppfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ def get_rld_link(current_dir):

file_name = '%s.html' % genericsettings.pprldmany_file_name
links += add_link(current_dir, folder, file_name,
pprldmany_per_func_dim_header, dimension=20)
pprldmany_per_func_dim_header, dimension=testbedsettings.current_testbed.goto_dimension)

file_name = '%s.html' % genericsettings.pprldmany_group_file_name
links += add_link(current_dir, folder, file_name,
pprldmany_per_group_dim_header, dimension=20)
pprldmany_per_group_dim_header, dimension=testbedsettings.current_testbed.goto_dimension)

file_name = '%s.html' % genericsettings.pprldmany_file_name
links += add_link(current_dir, '', file_name,
pprldmany_per_group_dim_header, dimension=20)
pprldmany_per_group_dim_header, dimension=testbedsettings.current_testbed.goto_dimension)

return links

Expand Down
5 changes: 5 additions & 0 deletions code-postprocessing/cocopp/rungenericmany.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ def main(argv=None):
print(" loading data...")
dsList, sortedAlgs, dictAlg = processInputArgs(args, True)

# filter data set lists to be compliant with all suites
# (useful right now only for bbob-biobj and bbob-biobj-ext data)
dsList = testbedsettings.current_testbed.filter(dsList)
dictAlg = testbedsettings.current_testbed.filter(dictAlg)

if not dsList:
sys.exit()

Expand Down
5 changes: 5 additions & 0 deletions code-postprocessing/cocopp/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def main(arguments):
print('** subtest 10 finished in ', time.time() - t0, ' seconds')
assert result == 0, 'Test failed: rungeneric on newly generated random search data on `bbob`.'

with InfolderGoneWithTheWind():
t0 = time.time()
result = os.system(python + command +
join_path(recent_data_path, 'RS-bi'))
Expand All @@ -369,24 +370,28 @@ def main(arguments):
# assert result == 0, 'Test failed: rungeneric on newly generated random search data on `bbob-constrained`.'
# delete_files(all_files=True)

with InfolderGoneWithTheWind():
t0 = time.time()
result = os.system(python + command + data_archive_get(
'test/RS-4.zip'))
print('** subtest 13 finished in ', time.time() - t0, ' seconds')
assert result == 0, 'Test failed: rungeneric on RS-4.zip.'

with InfolderGoneWithTheWind():
t0 = time.time()
result = os.system(python + command +
join_path(recent_data_path, 'RS-la'))
print('** subtest 14 finished in ', time.time() - t0, ' seconds')
assert result == 0, 'Test failed: rungeneric on newly generated random search data on `bbob-largescale`.'

with InfolderGoneWithTheWind():
t0 = time.time()
result = os.system(python + command +
join_path(recent_data_path, 'RS-mi'))
print('** subtest 15 finished in ', time.time() - t0, ' seconds')
assert result == 0, 'Test failed: rungeneric on newly generated random search data on `bbob-mixint`.'

with InfolderGoneWithTheWind():
t0 = time.time()
result = os.system(python + command +
join_path(recent_data_path, 'RS-bi-mi'))
Expand Down
Loading