CyberAgentAILab / cmaes

Python library for CMA Evolution Strategy.
https://arxiv.org/abs/2402.01373
MIT License
358 stars 61 forks source link

Scipy Dependency #114

Closed nomuramasahir0 closed 1 year ago

nomuramasahir0 commented 2 years ago

Discussion

Now I'm trying to introduce CMA-ES with Margin, and I'm thinking of putting scipy dependency into this repository. Specifically, I'd like to use chi2.ppf in the following. https://github.com/scipy/scipy/blob/v1.9.1/scipy/stats/_continuous_distns.py#L1343-L1407 It might be possible to implement chi2.ppf without scipy, but it seems to be a bit difficult (at least for me).

Optuna, which employs this repository for using CMA-ES, already requires scipy, so I think this doesn't become a problem. https://github.com/optuna/optuna/blob/master/setup.py#L39

nomuramasahir0 commented 2 years ago

What do you think? @c-bata

c-bata commented 2 years ago

As for Optuna, we are currently considering removing scipy from the dependencies. However, I agree with the use of scipy in cmaes library :+1: Implementing CMA-ES with Margin is much more important than removing the scipy dependency.

nomuramasahir0 commented 2 years ago

Ok, thanks! Btw, I can work for removing scipy in the next month (if you hope so). When we're implementing it from scratch, I think it is better to compare the accuracy and computational time with scipy.

c-bata commented 2 years ago

I can work for removing scipy in the next month (if you hope so). When we're implementing it from scratch, I think it is better to compare the accuracy and computational time with scipy.

Sounds great 👍 As you said, we should compare the accuracy though.

c-bata commented 1 year ago

FYI: @amylase is working on this issue on https://github.com/CyberAgentAILab/cmaes/pull/126