Skip to content
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

Closed
exalate-issue-sync bot opened this issue May 12, 2023 · 5 comments
Closed

DeepLearning MOJOs should be thread-safe #9016

exalate-issue-sync bot opened this issue May 12, 2023 · 5 comments

Comments

@exalate-issue-sync
Copy link

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!!!

@exalate-issue-sync
Copy link
Author

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!

@exalate-issue-sync
Copy link
Author

Michal Kurka commented: [~accountid:5df8ab7e039b310ca8883f21] I am working on it - fix should be ready soon

@exalate-issue-sync
Copy link
Author

Kyrill Alyoshin commented: Thank you, Michal!

@exalate-issue-sync
Copy link
Author

Laurin Bulander commented: Very nice, thank you! 🙂

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

JIRA Issue Migration Info

Jira Issue: PUBDEV-6615
Assignee: Michal Kurka
Reporter: Kyrill Alyoshin
State: Resolved
Fix Version: 3.28.0.4
Attachments: N/A
Development PRs: Available

Linked PRs from JIRA

#4335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant