PonyGE / PonyGE2

PonyGE2: grammatical evolution and variants in Python
GNU General Public License v3.0
155 stars 92 forks source link

requirements #124

Closed MarkusEvo closed 3 years ago

MarkusEvo commented 3 years ago

Which requirements are essential? I was wondering if one could run ponyge2 without scikit-learn, scipy, pandas and matplotlib. So it could maybe be implemented with pypy.

dvpfagan commented 3 years ago

Unfortunately you need all the libraries.

Dave

On Wed 6 Jan 2021 at 10:31, MarkusEvo notifications@github.com wrote:

Which requirements are essential? I was wondering if one could run ponyge2 without scikit-learn, scipy, pandas and matplotlib. So it could maybe be implemented with pypy.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PonyGE/PonyGE2/issues/124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHTHOXDPOSOR7DG3EAI7TLSYQ3X7ANCNFSM4VXKYMRA .

nbro commented 3 years ago

@MarkusEvo The requirements are specified here: https://github.com/PonyGE/PonyGE2/blob/master/requirements.txt. However, you will get an error if you just do pip install -r requirements.txt. This pull request https://github.com/PonyGE/PonyGE2/pull/121 fixes the issue, but it's not yet been accepted. Of course, you should be working with virtual environments (https://docs.python.org/3/tutorial/venv.html or Conda).

jmmcd commented 3 years ago

I think for some possible applications it would not be hard to remove all of these dependencies, eg just don't call the moo_ plotting functions, comment out the imports. I don't think we will attempt that in this repo as we are firmly in the Numpy/Scipy stack like most of this ecosystem.

A better hope is that PyPy will support all these things someday soon. It already supports Numpy so there is hope.

MarkusEvo commented 3 years ago

Thank you for your help, that answered my question. Which modules exactly do use scipy and pandas?

jmmcd commented 3 years ago

Hi @MarkusEvo, probably it's easiest for you to check the top of the modules you're interested in!

MarkusEvo commented 3 years ago

I already implemented it in pypy, you just have to comment out the plotting and imports in stats.py. Disable Error Metric and just don't use moo.

MarkusEvo commented 3 years ago

Well now I'm having a memory leak issue instead, there is probably something that relies on reference counting which I wasn't able to identify yet

It was the multiprocessing had to edit maxtasksperchild but now it all works on pypy