davideferrari92 / multiobjective_symbolic_regression

This is a Python library that implements a Multi-objective Symbolic Regression algorithm. It can be used as a Machine Learning algorithm to create predictive models in the form of mathematical expressions.
GNU General Public License v3.0
14 stars 4 forks source link

Offspring can't be generated. #1

Closed Penguin0321 closed 11 months ago

Penguin0321 commented 11 months ago

I ran all 3 ipynb examples but they jamed in the last step. When I set verbose=2 in sr.fit() to get more details, it seems the first offspring is not generated even minutes later. Do you have any ideas?

Penguin0321 commented 11 months ago

here is the output: ############################################################################################### Generation 0:00:00 - On average: 00:00:00 ± 00:00:00 - Total: 00:00:00 - To completion: Unknown ############################################################################################### audi_checkpoint: starting generation 1/500 Offsprings generated: 0/300 (816 s, 0.0 /s)

davideferrari92 commented 11 months ago

That's unusual. I'll have a look into this. Did you use the default configuration of the notebook or changed it? Also how many CPU cores did you give the training?

On Thu, 9 Nov 2023, 06:34 Probe, @.***> wrote:

I ran all 3 ipynb examples but they jamed in the last step. When I set verbose=2 in sr.fit() to get more details, it seems the first offspring is not generated even minutes later. Do you have any ideas?

— Reply to this email directly, view it on GitHub https://github.com/davideferrari92/multiobjective_symbolic_regression/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQIFDKTH5YDWG5YQM52OYLYDR2OBAVCNFSM6AAAAAA7EBEC3OVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4DIOJSHE4DGNI . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>

Penguin0321 commented 11 months ago

I didnt change anything in each ipynb file (except verbose) or jupyter-lab. Does the parameter "n_jobs" stand for CPU cores I give? I left it as -1. When the first offspring is generating, the CPU usage on task manager is nearly 0.

davideferrari92 commented 11 months ago

Can you give me more info about the Python version and the packages you have installed?

davideferrari92 commented 11 months ago

In general, try to execute creating a new python environment just for this test because I also have problems with environments that I used for other applications. When I create a fresh one with python -m venv venv and then pip install -r requirements.txt when it worked fine.

Also make sure to have pulled the last version of the repository (I made changes about this type of error a few weeks ago and maybe it's just the matter of getting the updated version).

Penguin0321 commented 11 months ago

I downloaded the latest code and created python environment with anaconda. The python version is 3.8.18, and the details about packages are in the attach file. requirements_Penguin.txt. However, the first offspring still cannot be generated in each ipynb example.

davideferrari92 commented 11 months ago

Sorry to hear that. Happy to look into that personally. Drop me an email at @.*** so we can schedule a f2f meeting and try to fix it.

On Sat, 11 Nov 2023, 17:38 Probe, @.***> wrote:

I downloaded the latest code and created python environment with anaconda. The python version is 3.8.18, and the details about packages are in the attach file. requirements_Penguin.txt https://github.com/davideferrari92/multiobjective_symbolic_regression/files/13326057/requirements_Penguin.txt . However, the first offspring still cannot be generated in each ipynb example.

— Reply to this email directly, view it on GitHub https://github.com/davideferrari92/multiobjective_symbolic_regression/issues/1#issuecomment-1806873891, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQIFDIIWTSI2N4WYL4ONT3YD6ZZXAVCNFSM6AAAAAA7EBEC3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWHA3TGOBZGE . You are receiving this because you commented.Message ID: <davideferrari92/multiobjective_symbolic_regression/issues/1/1806873891@ github.com>

Penguin0321 commented 11 months ago

I'm very grateful for your enthusiasm. However, I have fixed this issue after I thoroughly checked the error messages in the console (These messages are not output on web of Jupyter Notebook). I guess you develop this project on Mac or Linux, but I ran the ipynb examples on Windows. Since the signal mechanism is not fully supported in Windows kernel, "signal.SIGALRM" and "signal.alarm" give error in "./symbolic_regression/SymbolicRegressor.py". I have replaced "signal.SIGALRM" with "signal.SIGABRT", and "signal.alarm" with "time.sleep". The offsprings can be generated now, though ETA is more than a day. Thanks again for your help.

davideferrari92 commented 11 months ago

Ah great. Yes, I develop on Linux and will fix that. Thanks for the debug.

The ETA depends strongly on the jobs you allow and how complex the expressions get. I recommend starting with few generations to explore. Unfortunately, for to the nature of the algorithm, it's a slow process and may end up in long trainings. So far there's nothing much I could do on my end but will continue to improve. Also even I am discovering the limitations of the approach and so there may be inefficiencies that have to be fixed.

Do let me know if I can support your further and feel free to report any issues.

On Mon, 13 Nov 2023, 05:24 Probe, @.***> wrote:

I'm very grateful for your enthusiasm. However, I have fixed this issue after I thoroughly checked the error messages in the console (These messages are not output on web of Jupyter Notebook). I guess you develop this project on Mac or Linux, but I ran the ipynb examples on Windows. Since the signal mechanism is not fully supported in Windows kernel, "signal.SIGALRM" and "signal.alarm" give error in "./symbolic_regression/SymbolicRegressor.py". I have replaced "signal.SIGALRM" with "signal.SIGABRT", and "signal.alarm" with "time.sleep". The offsprings can be generated now, though ETA is more than a day. Thanks again for your help.

— Reply to this email directly, view it on GitHub https://github.com/davideferrari92/multiobjective_symbolic_regression/issues/1#issuecomment-1807497242, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQIFDJZRVXZ5TFPR3P7GY3YEGVKNAVCNFSM6AAAAAA7EBEC3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGQ4TOMRUGI . You are receiving this because you commented.Message ID: <davideferrari92/multiobjective_symbolic_regression/issues/1/1807497242@ github.com>

davideferrari92 commented 11 months ago

Now the code should be fixed to run properly on Windows too, please consider downloading the latest version. Do let me know if there's anything else.