-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeepLearning MOJOs should be thread-safe #9016
Comments
Laurin Bulander commented: Are there any updates on this issue? We have also experienced unpredictable behavior of the DeeplearningMojoModel in a multi-threaded environment. Thank you! |
Michal Kurka commented: [~accountid:5df8ab7e039b310ca8883f21] I am working on it - fix should be ready soon |
Kyrill Alyoshin commented: Thank you, Michal! |
Laurin Bulander commented: Very nice, thank you! 🙂 |
JIRA Issue Migration Info Jira Issue: PUBDEV-6615 Linked PRs from JIRA |
Current DeeplearningMojoModel class is not thread-safe. It may have been done to save on memory, yet, it seems to lead to more trouble down the road for users of this class. First of all, it is somewhat unpredictable behavior, as other mojos are thread-safe. Second, to address thread-safety issue, the users will be forced to resort to instantiate multiple DL mojos (one per thread) if they still want parallelization (which is a very reasonable expectation), thus consuming way more memory than it would have been, had the mojo been thread-safe to begin with. It seems that this is a relatively easy change to implement. At an absolute minimum, it should be documented in the Javadoc that the class is not safe to use across threads.
We've spent over a week troubleshooting unpredictable behavior of DL mojo results. Our environment is heterogeneous: Windows, Linux, Mac and we use direct low-level mojo classes instead of the easy wrapper.
Thank you so much!!!
The text was updated successfully, but these errors were encountered: