You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, because in the code for the scoring function the context is set, multiple calls to this function will lead to a Runtime Error "context has already been set".
I think it isn't best practice to set the context inside a function call that could be theoretically called multiple times. Or at least, it should be checked that the context is not already set before trying to set it.
As an example of the use case problem, I encountered this when scoring inference for multiple models. So because of this, I need to call as many processes as models I have to score.
Fixing this should be extremely quick (an if statement to check that the context is not set), I can open a pull request for it.
The text was updated successfully, but these errors were encountered:
I agree with your solution, starting a local context is better if you want it always to use "spawn". I will open a PR now and merge it into contrib_dev.
Hi, because in the code for the scoring function the context is set, multiple calls to this function will lead to a Runtime Error "context has already been set".
plinder/src/plinder/eval/docking/write_scores.py
Lines 215 to 231 in 9658cc2
I think it isn't best practice to set the context inside a function call that could be theoretically called multiple times. Or at least, it should be checked that the context is not already set before trying to set it.
As an example of the use case problem, I encountered this when scoring inference for multiple models. So because of this, I need to call as many processes as models I have to score.
Fixing this should be extremely quick (an if statement to check that the context is not set), I can open a pull request for it.
The text was updated successfully, but these errors were encountered: