nnaisense / evotorch

Advanced evolutionary computation library built directly on top of PyTorch, created at NNAISENSE.
https://evotorch.ai
Apache License 2.0
997 stars 62 forks source link

Fix C decomposition rate calculation on CUDA devices #64

Closed NaturalGradient closed 1 year ago

NaturalGradient commented 1 year ago

This PR resolves #61 by ensuring the decomposition rate of C is calculated using values on the CPU. It also ensures that the step size is reported as a float, regardless of the dtype and device of the problem. This is important as step size is a single value and is therefore reported like e.g. mean_eval.

codecov-commenter commented 1 year ago

Codecov Report

Merging #64 (68167ac) into master (aa57024) will not change coverage. The diff coverage is 66.66%.

:exclamation: Current head 68167ac differs from pull request most recent head ccd95e8. Consider uploading reports for the commit ccd95e8 to get more accurate results

@@           Coverage Diff           @@
##           master      #64   +/-   ##
=======================================
  Coverage   77.74%   77.74%           
=======================================
  Files          49       49           
  Lines        7321     7321           
=======================================
  Hits         5692     5692           
  Misses       1629     1629           
Impacted Files Coverage Δ
src/evotorch/algorithms/cmaes.py 82.94% <66.66%> (ø)
src/evotorch/core.py 74.48% <0.00%> (ø)
src/evotorch/logging.py 90.59% <0.00%> (ø)
src/evotorch/algorithms/mapelites.py 83.69% <0.00%> (ø)
src/evotorch/algorithms/restarter/restart.py 0.00% <0.00%> (ø)
src/evotorch/algorithms/distributed/gaussian.py 83.25% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.