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

Reintroduce the feature of n_jobs (multi-thread) #2937

Closed
6 tasks done
keisuke-umezawa opened this issue Sep 19, 2021 · 6 comments
Closed
6 tasks done

Reintroduce the feature of n_jobs (multi-thread) #2937

keisuke-umezawa opened this issue Sep 19, 2021 · 6 comments
Labels
contribution-welcome Issue that welcomes contribution. document Documentation related. feature Change that does not break compatibility, but affects the public interfaces. no-stale Exempt from stale bot optuna.study Related to the `optuna.study` submodule. This is automatically labeled by github-actions. v3 Issue/PR for Optuna version 3.

Comments

@keisuke-umezawa
Copy link
Member

keisuke-umezawa commented Sep 19, 2021

Motivation

The feature of n_jobs (multi-thread) was deprecated in this PR because it is impractical in most use cases and can be reproduced by writing a few lines of code if users want to reproduce the same thing. However, some people on Twitter and 3 people on the PR wanted to reintroduce the feature. Based on the above, it is necessary to consider whether to reintroduce n_jobs (multi-thread) or not.

Description

We would like to make a consensus whether to reintroduce n_jobs (multi-thread) or not. If reintroducing it, we will restore the n_jobs (multi-thread) argument. If not, we will consider appropriate alternatives and develop a plan for them. Also, we will decide that Optuna's data structures may continue to support multi-threading.

Consensus for the solution (Added on Dec 17, 2011)

From the following reasons, we decided that we will continue to support the feature of n_jobs.

  • We observed that more people wish to reintroduce this feature than people who claimed for misusing the feature.
  • Also, this feature can be useful for tasks not blocked by GIL.

TODOs

  • Make a consensus for the solution in this issue
  • If reintroducing it,
    • Remove deprecate decorator
    • Provide enough information to avoid misuse of the feature e.g.
      • API reference
      • FAQ
      • etc
  • If not,
    • [ ] Create a plan to provide alternative solutions and documentation
    • [ ] Make a consensus for Optuna's data structures

Reference

@keisuke-umezawa keisuke-umezawa added feature Change that does not break compatibility, but affects the public interfaces. v3 Issue/PR for Optuna version 3. no-stale Exempt from stale bot labels Sep 19, 2021
@tsuga
Copy link

tsuga commented Sep 21, 2021

I'm wondering if process-based (by multiprocessing module) would be an option as well.
This is the code that is for Scikit-Learn integration, but it would great if n_jobs is supported again globally.

https://github.com/tsuga/optuna/blob/55d809f16baf824a758a7e242d7e78484d3541e3/optuna/integration/sklearn.py#L890-L906

@keisuke-umezawa
Copy link
Member Author

@tsuga Thank you for the comment. We will investigate multiprocess treatment in this issue #2950.

@Crissman Crissman added contribution-welcome Issue that welcomes contribution. Hacktoberfest Good first issues to participate in Hacktoberfest labels Sep 30, 2021
@toshihikoyanase toshihikoyanase removed the Hacktoberfest Good first issues to participate in Hacktoberfest label Nov 11, 2021
@keisuke-umezawa
Copy link
Member Author

Update the description.

@HideakiImamura HideakiImamura added the document Documentation related. label Dec 19, 2021
@HideakiImamura HideakiImamura added the optuna.study Related to the `optuna.study` submodule. This is automatically labeled by github-actions. label Dec 20, 2021
@HideakiImamura
Copy link
Member

@keisuke-umezawa What other documentation needs to be enhanced besides the API reference and FAQ? (The etc part in the issue description.)

@keisuke-umezawa
Copy link
Member Author

@keisuke-umezawa What other documentation needs to be enhanced besides the API reference and FAQ? (The etc part in the issue description.)

Maybe, nothitng.

@HideakiImamura
Copy link
Member

Let me close this issue since all tasks have done. Please feel free to reopen if you have any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution-welcome Issue that welcomes contribution. document Documentation related. feature Change that does not break compatibility, but affects the public interfaces. no-stale Exempt from stale bot optuna.study Related to the `optuna.study` submodule. This is automatically labeled by github-actions. v3 Issue/PR for Optuna version 3.
Projects
None yet
Development

No branches or pull requests

5 participants