coco-experiment 2.8.1__tar.gz → 2.8.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/PKG-INFO +1 -1
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/pyproject.toml +9 -2
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/_version.py +1 -1
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/coco.c +29 -12
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/utilities.py +7 -6
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/.gitignore +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/LICENSE +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/README.md +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/meson.build +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/scripts/run-doctest.py +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/__init__.py +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/bare_problem.pyx +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/coco.h +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/download_example.py +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/exceptions.py +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/interface.pyx +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/noiser.py +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/src/cocoex/solvers.py +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/tests/bbob2009_testcases.txt +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/tests/bbob2009_testcases2.txt +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/tests/test_bare_problem.py +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/tests/test_regression.py +0 -0
- {coco_experiment-2.8.1 → coco_experiment-2.8.2}/tests/test_suite.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coco-experiment
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.2
|
|
4
4
|
Summary: Benchmarking framework for all types of black-box optimization algorithms.
|
|
5
5
|
Project-URL: Homepage, https://github.com/numbbo/coco-experiment
|
|
6
6
|
Project-URL: Documentation, https://numbbo.github.io/coco-doc/apidocs/cocoex/
|
|
@@ -35,7 +35,9 @@ classifiers = [
|
|
|
35
35
|
"Programming Language :: Python :: 3.12",
|
|
36
36
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
37
37
|
]
|
|
38
|
-
dependencies = [
|
|
38
|
+
dependencies = [
|
|
39
|
+
"numpy >= 1.24.0",
|
|
40
|
+
]
|
|
39
41
|
dynamic = ["version"]
|
|
40
42
|
|
|
41
43
|
[project.urls]
|
|
@@ -48,7 +50,7 @@ where = ["src"]
|
|
|
48
50
|
|
|
49
51
|
[tool.pytest]
|
|
50
52
|
log_cli = true
|
|
51
|
-
addopts = "--doctest-modules"
|
|
53
|
+
addopts = ["--doctest-modules"]
|
|
52
54
|
|
|
53
55
|
[tool.cibuildwheel]
|
|
54
56
|
build-frontend = "build"
|
|
@@ -71,3 +73,8 @@ include = [
|
|
|
71
73
|
|
|
72
74
|
[tool.hatch.version]
|
|
73
75
|
path = "src/cocoex/_version.py"
|
|
76
|
+
|
|
77
|
+
[dependency-groups]
|
|
78
|
+
dev = [
|
|
79
|
+
"build>=1.2",
|
|
80
|
+
]
|
|
@@ -25922,6 +25922,18 @@ void coco_suite_decode_problem_index(const coco_suite_t *suite, const size_t pro
|
|
|
25922
25922
|
#include <limits.h>
|
|
25923
25923
|
#include <math.h>
|
|
25924
25924
|
|
|
25925
|
+
/**
|
|
25926
|
+
* @brief Number of triggers per decade of increasing evaluations (20), was: 20
|
|
25927
|
+
*
|
|
25928
|
+
* Changing this number currently breaks the test_logger_bbob.c unit-test
|
|
25929
|
+
*/
|
|
25930
|
+
#define OBSERVER_DEFAULT_NUMBER_OF_EVALUATION_TRIGGERS 20
|
|
25931
|
+
|
|
25932
|
+
/**
|
|
25933
|
+
* @brief Number of triggers per decade of decreasing Df values (20), was: 5, then 100
|
|
25934
|
+
*/
|
|
25935
|
+
#define OBSERVER_DEFAULT_NUMBER_OF_TARGET_TRIGGERS 20
|
|
25936
|
+
|
|
25925
25937
|
/**
|
|
25926
25938
|
* @brief The type for triggers based on logarithmic target values (targets that
|
|
25927
25939
|
* are uniformly distributed in the logarithmic space).
|
|
@@ -26236,7 +26248,7 @@ static coco_observer_evaluations_t *coco_observer_evaluations(const char *base_e
|
|
|
26236
26248
|
/* First trigger */
|
|
26237
26249
|
evaluations->value1 = 1;
|
|
26238
26250
|
evaluations->exponent1 = 0;
|
|
26239
|
-
evaluations->number_of_triggers =
|
|
26251
|
+
evaluations->number_of_triggers = OBSERVER_DEFAULT_NUMBER_OF_EVALUATION_TRIGGERS;
|
|
26240
26252
|
|
|
26241
26253
|
/* Second trigger */
|
|
26242
26254
|
evaluations->base_evaluations =
|
|
@@ -26557,6 +26569,11 @@ static void observer_bbob(coco_observer_t *observer, const char *options, coco_o
|
|
|
26557
26569
|
*/
|
|
26558
26570
|
#define LOGGER_BBOB_INFEASIBLE_PENALTY 1e10
|
|
26559
26571
|
|
|
26572
|
+
/**
|
|
26573
|
+
* Record variable values only when #variables is below this threshold, was: 22
|
|
26574
|
+
*/
|
|
26575
|
+
#define LOGGER_BBOB_NUMBER_OF_VARIABLES_THRESHOLD 7
|
|
26576
|
+
|
|
26560
26577
|
/**
|
|
26561
26578
|
* @brief The bbob logger data type.
|
|
26562
26579
|
*/
|
|
@@ -26696,7 +26713,7 @@ static void logger_bbob_output(FILE *data_file, logger_bbob_data_t *logger, cons
|
|
|
26696
26713
|
fprintf(data_file, "%+10.9e", best_value);
|
|
26697
26714
|
}
|
|
26698
26715
|
|
|
26699
|
-
if (logger->number_of_variables <
|
|
26716
|
+
if (logger->number_of_variables < LOGGER_BBOB_NUMBER_OF_VARIABLES_THRESHOLD) {
|
|
26700
26717
|
for (i = 0; i < logger->number_of_variables; i++) {
|
|
26701
26718
|
if ((i < logger->number_of_integer_variables) && (logger->log_discrete_as_int))
|
|
26702
26719
|
fprintf(data_file, " %d", coco_double_to_int(x[i]));
|
|
@@ -27249,7 +27266,7 @@ static coco_problem_t *logger_bbob(coco_observer_t *observer, coco_problem_t *in
|
|
|
27249
27266
|
observer_data->observed_problem = problem;
|
|
27250
27267
|
return problem;
|
|
27251
27268
|
}
|
|
27252
|
-
#line
|
|
27269
|
+
#line 510 "coco_observer.c"
|
|
27253
27270
|
#line 1 "logger_bbob_old.c"
|
|
27254
27271
|
/**
|
|
27255
27272
|
* @file logger_bbob_old.c
|
|
@@ -27912,7 +27929,7 @@ static coco_problem_t *logger_bbob_old(coco_observer_t *observer, coco_problem_t
|
|
|
27912
27929
|
bbob_old_logger_is_open = 1;
|
|
27913
27930
|
return problem;
|
|
27914
27931
|
}
|
|
27915
|
-
#line
|
|
27932
|
+
#line 511 "coco_observer.c"
|
|
27916
27933
|
#line 1 "logger_biobj.c"
|
|
27917
27934
|
/**
|
|
27918
27935
|
* @file logger_biobj.c
|
|
@@ -30236,7 +30253,7 @@ static coco_problem_t *logger_biobj(coco_observer_t *observer, coco_problem_t *i
|
|
|
30236
30253
|
observer_data->observed_problem = problem;
|
|
30237
30254
|
return problem;
|
|
30238
30255
|
}
|
|
30239
|
-
#line
|
|
30256
|
+
#line 512 "coco_observer.c"
|
|
30240
30257
|
#line 1 "logger_rw.c"
|
|
30241
30258
|
/**
|
|
30242
30259
|
* @file logger_rw.c
|
|
@@ -30572,7 +30589,7 @@ static coco_problem_t *logger_rw(coco_observer_t *observer, coco_problem_t *inne
|
|
|
30572
30589
|
|
|
30573
30590
|
return problem;
|
|
30574
30591
|
}
|
|
30575
|
-
#line
|
|
30592
|
+
#line 513 "coco_observer.c"
|
|
30576
30593
|
#line 1 "logger_toy.c"
|
|
30577
30594
|
/**
|
|
30578
30595
|
* @file logger_toy.c
|
|
@@ -30761,7 +30778,7 @@ static coco_problem_t *logger_toy(coco_observer_t *observer, coco_problem_t *inn
|
|
|
30761
30778
|
|
|
30762
30779
|
return problem;
|
|
30763
30780
|
}
|
|
30764
|
-
#line
|
|
30781
|
+
#line 514 "coco_observer.c"
|
|
30765
30782
|
|
|
30766
30783
|
/**
|
|
30767
30784
|
* Currently, four observers are supported:
|
|
@@ -30905,13 +30922,13 @@ coco_observer_t *coco_observer(const char *observer_name, const char *observer_o
|
|
|
30905
30922
|
strcpy(settings, "");
|
|
30906
30923
|
}
|
|
30907
30924
|
|
|
30908
|
-
number_target_triggers =
|
|
30925
|
+
number_target_triggers = OBSERVER_DEFAULT_NUMBER_OF_TARGET_TRIGGERS;
|
|
30909
30926
|
if (coco_options_read_size_t(observer_options, "number_target_triggers", &number_target_triggers) != 0) {
|
|
30910
30927
|
if (number_target_triggers < 0) {
|
|
30911
30928
|
coco_warning("coco_observer(): Unsuitable observer option value "
|
|
30912
30929
|
"(number_target_triggers: %lu) ignored",
|
|
30913
30930
|
number_target_triggers);
|
|
30914
|
-
number_target_triggers =
|
|
30931
|
+
number_target_triggers = OBSERVER_DEFAULT_NUMBER_OF_TARGET_TRIGGERS;
|
|
30915
30932
|
}
|
|
30916
30933
|
}
|
|
30917
30934
|
|
|
@@ -30935,13 +30952,13 @@ coco_observer_t *coco_observer(const char *observer_name, const char *observer_o
|
|
|
30935
30952
|
}
|
|
30936
30953
|
}
|
|
30937
30954
|
|
|
30938
|
-
number_evaluation_triggers =
|
|
30955
|
+
number_evaluation_triggers = OBSERVER_DEFAULT_NUMBER_OF_EVALUATION_TRIGGERS;
|
|
30939
30956
|
if (coco_options_read_size_t(observer_options, "number_evaluation_triggers", &number_evaluation_triggers) != 0) {
|
|
30940
30957
|
if (number_evaluation_triggers < 4) {
|
|
30941
30958
|
coco_warning("coco_observer(): Unsuitable observer option value "
|
|
30942
30959
|
"(number_evaluation_triggers: %lu) ignored",
|
|
30943
30960
|
number_evaluation_triggers);
|
|
30944
|
-
number_evaluation_triggers =
|
|
30961
|
+
number_evaluation_triggers = OBSERVER_DEFAULT_NUMBER_OF_EVALUATION_TRIGGERS;
|
|
30945
30962
|
}
|
|
30946
30963
|
}
|
|
30947
30964
|
|
|
@@ -31527,7 +31544,7 @@ void coco_archive_free(coco_archive_t *archive) {
|
|
|
31527
31544
|
* don't change, don't track in version control!
|
|
31528
31545
|
*/
|
|
31529
31546
|
|
|
31530
|
-
const char *coco_version = "2.8.
|
|
31547
|
+
const char *coco_version = "2.8.2";
|
|
31531
31548
|
#line 1 "coco_runtime_c.c"
|
|
31532
31549
|
/**
|
|
31533
31550
|
* @file coco_runtime_c.c
|
|
@@ -308,13 +308,14 @@ class ProblemNonAnytime:
|
|
|
308
308
|
The method records the delivered solution (if necessary) and
|
|
309
309
|
prepares the problem to be run on the next budget by calling
|
|
310
310
|
`reset`.
|
|
311
|
+
|
|
312
|
+
Whether the evaluation is done is based on the comparison with the best
|
|
313
|
+
so-far fvalue, which is a hack. When the behavior of the solver is known, it is better to use::
|
|
314
|
+
|
|
315
|
+
problem(x) # depending on whether this is necessary or not
|
|
316
|
+
problem.reset()
|
|
317
|
+
|
|
311
318
|
"""
|
|
312
|
-
if self.evaluations < self.p_observed.evaluations:
|
|
313
|
-
raise ValueError(
|
|
314
|
-
"Delivered solutions should come from increasing budgets,\n"
|
|
315
|
-
"however the current budget = {0} is smaller than the "
|
|
316
|
-
"delivery budget = {1}".format(
|
|
317
|
-
self.p_observed.evaluations, self.evaluations))
|
|
318
319
|
# assuming that "same fitness" means the solution was already evaluated
|
|
319
320
|
if self.p_unobserved(x, *args, **kwargs) != self.best_observed_fvalue1:
|
|
320
321
|
# ideally we would decrease the observed evaluation counter,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|