elumixor / DRL-Level-Generator

1 stars 0 forks source link

Process optimization #8

Open elumixor opened 3 years ago

elumixor commented 3 years ago

Single process should be launched for the model.

We need separate process for training each separate NN. We can guarantee that single NN will not be updated concurrently.

Currently we are starting new process for every new request. We should instead use some form of inter-process communication, e.g. send signals and update shared data.

Doing that should also take care of #7

elumixor commented 3 years ago

We might also use ProcessPoolExecutor for this

elumixor commented 3 years ago

9 Updates makes communicator now only uses threads. The logger in the only one using a separate process (due to matplotlib) Perhaps we should also use different processes somewhere in the program for computationally expensive tasks.