Skip to content

Terminology: n_jobs vs num_workers vs ncpu etc. #4876

@emmanuelle

Description

@emmanuelle

Since we aim at accelerating some of our functions, one way to do this is to use parallel computing. We already have one function (restoration.cycle_spin) which is using dask.delayed and several threads, there is also the attempt to parallelize segmentation.slic in #3120 which I plan to revive, and probably other functions will have in the future the possibility to use one or more jobs/workers (threads or processes). Therefore, I'm opening this issue so that we can decide what is the best terminology for this parameter. Should it be

  • num_workers (as in cycle_spin, and as in dask)
  • n_jobs (as in scikit-learn and in joblib)
  • something else? (probably not, it's unfortunate enough that joblib and dask have a different convention)
    I think both are fine, the choice should be more about consistency with the rest of the ecosystem: do we want to be more consistent with our backend, or with big brother scikit?

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions