Skip to content

Commit

Permalink
Merge pull request #175 from CyberAgentAILab/fix-ci
Browse files Browse the repository at this point in the history
remove kurobako dependency
  • Loading branch information
nomuramasahir0 authored Apr 2, 2024
2 parents bbeb640 + 962d4cb commit 50ea479
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 84 deletions.
78 changes: 0 additions & 78 deletions .github/workflows/benchmarks.yml

This file was deleted.

4 changes: 4 additions & 0 deletions cmaes/_cma.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,10 @@ def tell(self, solutions: list[tuple[np.ndarray, float]]) -> None:

# Learning rate adaptation: https://arxiv.org/abs/2304.03473
if self._lr_adapt:
assert isinstance(old_mean, np.ndarray)
assert isinstance(old_sigma, (int, float))
assert isinstance(old_Sigma, np.ndarray)
assert isinstance(old_invsqrtC, np.ndarray)
self._lr_adaptation(old_mean, old_sigma, old_Sigma, old_invsqrtC)

def _lr_adaptation(
Expand Down
16 changes: 10 additions & 6 deletions cmaes/_dxnesic.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,20 @@ def tell(self, solutions: list[tuple[np.ndarray, float]]) -> None:
eta_sigma = (
self._eta_move_sigma
if norm_p_sigma >= self._chi_n
else self._eta_stag_sigma(lamb_feas)
if norm_p_sigma >= 0.1 * self._chi_n
else self._eta_conv_sigma(lamb_feas)
else (
self._eta_stag_sigma(lamb_feas)
if norm_p_sigma >= 0.1 * self._chi_n
else self._eta_conv_sigma(lamb_feas)
)
)
eta_B = (
self._eta_move_B(lamb_feas)
if norm_p_sigma >= self._chi_n
else self._eta_stag_B(lamb_feas)
if norm_p_sigma >= 0.1 * self._chi_n
else self._eta_conv_B(lamb_feas)
else (
self._eta_stag_B(lamb_feas)
if norm_p_sigma >= 0.1 * self._chi_n
else self._eta_conv_B(lamb_feas)
)
)

# natural gradient estimation in local coordinate
Expand Down
1 change: 1 addition & 0 deletions tools/cmaes_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
python3 tools/cmaes_visualizer.py --function himmelblau \
--restart-strategy ipop --frames 500 --interval 10 --pop-per-frame 6
"""

import argparse
import math

Expand Down
1 change: 1 addition & 0 deletions tools/ws_cmaes_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Example:
python3 ws_cmaes_visualizer.py --function rot-ellipsoid
"""

import argparse
import math

Expand Down

0 comments on commit 50ea479

Please sign in to comment.