[RFC] Stop multi-thread supports.
See original GitHub issueMotivation
The current optuna supports multi-thread execution. However, it does not result in any speed gain in general use cases because of python GIL. Rather, the execution time can become longer when we specify n_jobs > 1. The multi-thread support just complicates storage codes and causes hard-to-catch bugs. For example, I suspect the thread-safety relates to #820 Additionally, it forces storage classes to copy data here and there, which increases overhead even at single-thread execution.
Proposal
I’d like to propose removing the whole multi-thread support and leave the n_job argument for future multi-process support.
I’d like to propose removing the whole multi-thread support and instead replace it with multi-process execution. It requires multi-process support by InMemoryStorage
and some changes in Study
logics e.g. study.stop
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:13 (7 by maintainers)
Top GitHub Comments
I updated the proposal. Even though the updated proposal is already mentioned in #1170, I think this problem is worth having a dedicated issue to discuss.
This issue was closed automatically because it had not seen any recent activity. If you want to discuss it, you can reopen it freely.