Concurrent training and predicting

I wonder if it is safe to continuously train a model while using it for making predictions at the same time (in different threads) or whether it’s necessary to pause predictions while retraining the model?

Any opinions or references on this?

technically its possible i think. During training you are making predictions too, to calculate the loss. However, whether it will give good, reliable and predictable results, thats another question.

You can access the model under training in a different thread and use locks while reading the data to make sure you get to use the model in a valid state while it is still being updated.

1 Like