Skip to content

more worker allocated when n_jobs > len(tasks) #38

Description

@Lonya0

Background

In lead_property.py, running Parallel(n_jobs, ...) may waste some CPU resources because when len(tasks) is less than n_jobs, it still allocates {n_jobs} workers. Those CPU cores or threads could be used for other tasks to accelerate overall performance. Suggest: Parallel(n_jobs=min(safe_n_jobs, len(total_tasks)), backend="loky")

Additionally, blas_threads_per_worker should also consider this to maximize performance.

Describe the solution you'd like

up there

Additional Context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions