eaplatanios / jelly-bean-world

A framework for experimenting with never-ending learning
Apache License 2.0
73 stars 17 forks source link

Slowing down when running multiple experiments #19

Closed George614 closed 1 year ago

George614 commented 2 years ago

Hi folks,

I have a dumb question here (I'm not aware of how exactly the simulator works under the hood). So I'm using Python with the OpenAI gym interface, the training runs slower when I start the second training session in another terminal. I checked the CPU usage, funny enough it's using 50% of CPU for each of my 2 training sessions. If I run 3 training sessions at the same time, each process uses around 1/3 of CPU. The problem is that I have a multi-core CPU and I want the program to maximize the CPU usage and speed. On the other side, I tried with other simple environments from OpenAI gym (MountainCar etc.), each training session uses around 100% of CPU on my Linux machine. Is there a way around this issue? Any feedback is appreciated!

Thank you!

asaparov commented 2 years ago

Hello, No worries, we welcome any questions! Hmm, so is your CPU single core? The simulator itself is CPU-bound and doesn't actually use any GPU. So if your model training iteration is faster than the simulator, your overall program will also be CPU-bound. If you have multiple CPU cores, then each training session should use a different core.

Hope this helps!