Skip to content

Commit

Permalink
dev: rename class name xNES -> XNES
Browse files Browse the repository at this point in the history
  • Loading branch information
BillHuang2001 committed Sep 4, 2023
1 parent 6345aee commit d9fb0f1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/source/api/algorithms/so/nes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xNES
====

.. autoclass:: evox.algorithms.xNES
.. autoclass:: evox.algorithms.XNES
:members:

.. autoclass:: evox.algorithms.SeparableNES
Expand Down
4 changes: 2 additions & 2 deletions src/evox/algorithms/so/es_variants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .esmc import ESMC
from .guided_es import GuidedES
from .ma_es import MAES, LMMAES
from .nes import xNES, SeparableNES
from .nes import XNES, SeparableNES
from .noise_reuse_es import Noise_reuse_es
from .open_es import OpenES
from .persistent_es import PersistentES
Expand All @@ -24,4 +24,4 @@
def LES(*args, **kwargs):
raise ImportError(
f'LES requires flax but got "{original_erorr_msg}" when importing'
)
)
2 changes: 1 addition & 1 deletion src/evox/algorithms/so/es_variants/nes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------------------
# This code implements algorithms described in the following papers:
#
# Title: Exponential Natural Evolution Strategies (xNES)
# Title: Exponential Natural Evolution Strategies (XNES)
# Link: https://dl.acm.org/doi/abs/10.1145/1830483.1830557
#
# Title: Natural Evolution Strategies (SeparableNES)
Expand Down
2 changes: 1 addition & 1 deletion src/evox/algorithms/so/es_variants/open_es.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# --------------------------------------------------------------------------------------
# This code implements algorithms described in the following papers:
#
# Title: Exponential Natural Evolution Strategies (xNES)
# Title: Exponential Natural Evolution Strategies (XNES)
# Link: https://dl.acm.org/doi/abs/10.1145/1830483.1830557
#
# Title: Natural Evolution Strategies (SeparableNES)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_single_objective_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import jax.numpy as jnp
import pytest
from evox import pipelines, problems
from evox.algorithms import CMAES, SepCMAES, CSO, DE, PGPE, PSO, OpenES, xNES, CoDE, JaDE, SaDE, SHADE
from evox.algorithms import CMAES, SepCMAES, CSO, DE, PGPE, PSO, OpenES, XNES, CoDE, JaDE, SaDE, SHADE
from evox.monitors import StdSOMonitor
from evox.utils import compose, rank_based_fitness

Expand Down Expand Up @@ -98,7 +98,7 @@ def test_openes(optimizer):
def test_xnes():
init_mean = jnp.array([5.0, -10, 15, -20, 25])
init_covar = jnp.eye(5) * 2
algorithm = xNES(init_mean, init_covar, pop_size=100)
algorithm = XNES(init_mean, init_covar, pop_size=100)
fitness = run_single_objective_algorithm(algorithm)
assert fitness < 0.1

Expand Down

0 comments on commit d9fb0f1

Please sign in to comment.