RobertTLange / evosax

Evolution Strategies in JAX 🦎
Apache License 2.0
475 stars 44 forks source link

Fix LMMAES #56

Open arahi10 opened 1 year ago

arahi10 commented 1 year ago

This pull request is for this issue.

Compared with implementation in numpy, the original LM_MA_ES in evosax seems to be incorrect wrt default parameters settings and parameters update expressions so I write a code corresponds to numpy implementation.

I used black linter and tested by evosax/tests/test_strategy_api.py. This is my first contribution, so please tell me if there are any problems.

codecov-commenter commented 1 year ago

Codecov Report

Merging #56 (f17f77e) into main (413c5ca) will decrease coverage by 0.01%. The diff coverage is 100.00%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/RobertTLange/evosax/pull/56/graphs/tree.svg?width=650&height=150&src=pr&token=5FUSX35KWO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Robert+Tjarko+Lange)](https://app.codecov.io/gh/RobertTLange/evosax/pull/56?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Robert+Tjarko+Lange) ```diff @@ Coverage Diff @@ ## main #56 +/- ## ========================================== - Coverage 88.86% 88.85% -0.01% ========================================== Files 76 76 Lines 4796 4793 -3 ========================================== - Hits 4262 4259 -3 Misses 534 534 ``` | [Impacted Files](https://app.codecov.io/gh/RobertTLange/evosax/pull/56?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Robert+Tjarko+Lange) | Coverage Δ | | |---|---|---| | [evosax/strategies/lm\_ma\_es.py](https://app.codecov.io/gh/RobertTLange/evosax/pull/56?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Robert+Tjarko+Lange#diff-ZXZvc2F4L3N0cmF0ZWdpZXMvbG1fbWFfZXMucHk=) | `100.00% <100.00%> (ø)` | |