coco-experiment 2.7.2__tar.gz → 2.7.3__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.
Files changed (22) hide show
  1. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/PKG-INFO +1 -1
  2. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/_version.py +1 -1
  3. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/coco.c +1 -1
  4. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/utilities.py +30 -16
  5. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/.gitignore +0 -0
  6. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/LICENSE +0 -0
  7. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/README.md +0 -0
  8. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/meson.build +0 -0
  9. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/pyproject.toml +0 -0
  10. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/scripts/run-doctest.py +0 -0
  11. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/__init__.py +0 -0
  12. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/bare_problem.pyx +0 -0
  13. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/coco.h +0 -0
  14. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/exceptions.py +0 -0
  15. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/interface.pyx +0 -0
  16. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/noiser.py +0 -0
  17. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/src/cocoex/solvers.py +0 -0
  18. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/tests/bbob2009_testcases.txt +0 -0
  19. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/tests/bbob2009_testcases2.txt +0 -0
  20. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/tests/test_bare_problem.py +0 -0
  21. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/tests/test_regression.py +0 -0
  22. {coco_experiment-2.7.2 → coco_experiment-2.7.3}/tests/test_suite.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coco-experiment
3
- Version: 2.7.2
3
+ Version: 2.7.3
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/
@@ -1,7 +1,7 @@
1
1
  # file generated by fabricate
2
2
  # Do not change, do not track in version control!
3
3
 
4
- __version__ = "2.7.2"
4
+ __version__ = "2.7.3"
5
5
  version = __version__
6
6
 
7
7
  if __name__ == "__main__":
@@ -31526,7 +31526,7 @@ void coco_archive_free(coco_archive_t *archive) {
31526
31526
  * don't change, don't track in version control!
31527
31527
  */
31528
31528
 
31529
- const char *coco_version = "2.7.2";
31529
+ const char *coco_version = "2.7.3";
31530
31530
  #line 1 "coco_runtime_c.c"
31531
31531
  /**
31532
31532
  * @file coco_runtime_c.c
@@ -647,8 +647,9 @@ class ExperimentRepeater:
647
647
  When problem instances are repeated in a single suite, they may be
648
648
  *partially* skipped *after* the first full sweep. That is, the
649
649
  configuration ``1-5,1-5,1-5`` can also lead to four trials of each
650
- instance 1-5, because all instances have been repeated the same number
651
- of times.
650
+ instance 1-5 of some problems when all instances have been repeated the
651
+ same number of times and have enough successes or the budget is
652
+ exhaused.
652
653
 
653
654
  >>> import cocoex # some not very meaningful testing
654
655
  >>> repeater = cocoex.ExperimentRepeater(2)
@@ -658,18 +659,31 @@ class ExperimentRepeater:
658
659
  >>> assert len(repeater.evaluations((1, 2))) == 0
659
660
 
660
661
  """
661
- def __init__(self, budget_multiplier, min_successes=None):
662
- """``min_successes=11`` is default and provokes at least three
663
-
664
- sweeps when the suite has (only) 5 instance and the
665
- `budget_multiplier` is large enough such that the algorithm
666
- terminates the second sweep before the overall budget is exhausted.
667
- This would emulate the 3 x 1-5 instance-setup from BBOB 2009,
668
- however the choice of the initial solution still slightly differs.
662
+ min_successes_default = 11
663
+ max_sweeps_default = 20
664
+ def __init__(self, budget_multiplier, min_successes=None, max_sweeps=None):
665
+ """constructor for `ExperimentRepeater`.
666
+
667
+ The "timeout" budget is computed as ``budget_multiplier`` times
668
+ problem dimension.
669
+
670
+ ``min_successes=11`` is default and provokes at least three sweeps
671
+ when the suite has (only) 5 instance and the `budget_multiplier` is
672
+ large enough such that the algorithm terminates the second sweep
673
+ before the overall budget is exhausted. This would emulate the 3 x
674
+ 1-5 instance-setup from BBOB 2009, however the choice of the
675
+ initial solution still slightly differs.
676
+
677
+ ``max_sweeps`` is the limit number of repititions for each
678
+ instance, by default 20. To have a limit is in particular useful
679
+ when the budget is large but an algorithm terminates very quickly
680
+ and invariably unsuccessfully.
669
681
  """
670
682
  self.params = {k: v for k, v in locals().items() if k != 'self'}
671
- self.min_successes = 11 if min_successes is None else min_successes
672
- self.max_sweeps = 1e4 # should not be necessary
683
+ self.min_successes = ExperimentRepeater.min_successes_default if (
684
+ min_successes is None) else min_successes
685
+ self.max_sweeps = ExperimentRepeater.max_sweeps_default if (
686
+ max_sweeps is None) else max_sweeps # useful on F7
673
687
  self._dimension_offset = 0
674
688
  '''budget = (dimension + offset) * budget_multiplier'''
675
689
  self._data = _collections.OrderedDict()
@@ -848,7 +862,7 @@ class ExperimentRepeater:
848
862
  it cannot account for problems that have not yet been run once.
849
863
 
850
864
  Calling ``done()`` increments the sweep counter iff it returns
851
- `False`, the default for ``max_sweeps`` is ``1e4``. The attribute
865
+ `False`, the default for ``max_sweeps`` is ``20``. The attribute
852
866
  can be directly reassigned at any time.
853
867
 
854
868
  See also: `remaining_problems`
@@ -861,11 +875,11 @@ class ExperimentRepeater:
861
875
  return True
862
876
  if message: # prints nothing when no data are found
863
877
  print(self.message_sweep(), end='') # indicates "sequence of problems" case
864
- self._sweeps += 1 # the sweep number to come
865
- done = self._sweeps >= self.max_sweeps or (
878
+ self._sweeps += 1 # the sweep number to come, needed in remaining_problems()
879
+ done = self._sweeps > self.max_sweeps or (
866
880
  self._sweeps > 1 and len(self._data) == 0) or (
867
881
  self.n_problem_instances() > 0 and not self.remaining_problems())
868
- self._sweeps -= done # don't increment when done
882
+ self._sweeps -= done # revert increment when done is True
869
883
  return done
870
884
  def remaining_problems(self, suite=None):
871
885
  """return `list` of (probably) remaining problem instances to run.
File without changes