fekiri malek
fekiri malek

Reputation: 376

Python multithreading or multiprocessing or something else

So i am in the case where i want to train and predict with few hundred models. for training it is all fine as tensorflow seem to use all the computing power of the cpu cores. when predicting i need to load each model from disk and use it. this does not use all cores. so it thought of multithreading and multiprocessing. to do the computation of the model prediction in parallel. but each has its down sides:

So the question is how to have something that will allow me to use all CPU power without having to make a copy of the process.

I saw some articles about python 3.13 having the option to disable GIL. But did not get further as tensorflow does not support that version yet.

Upvotes: 0

Views: 34

Answers (0)

Related Questions