sholloway / agents-playground

MIT License
4 stars 0 forks source link

Better Tools #49

Open sholloway opened 1 year ago

sholloway commented 1 year ago

I'd like to improve the quality of creating a simulation.

Mousing Around

sholloway commented 1 year ago

I've implemented a pass of collecting metics and displaying them in a toggle-able panel. Using psutil to get hardware information. This is currently less than ideal. Some of the hardware polls can be unpredictable in how long they take. Especially _psutil.cpupercent.

A thought is to have a dedicated sub-process for taking the samples. This would enable having the samples collected and in the case of slow downs not impact the actual main thread.

Implementation Thoughts/Options

  1. Leverage the multiprocessing module for spawning a child process that hangs out and measures the performance of the simulation process on a loop. This approach could use pickle to notify the main process and send the measurements.
  2. Leverage the Ray 3rd party module for doing the same thing.
  3. Leverage Charm4Py.