Github user futurely commented on the pull request:

    https://github.com/apache/spark/pull/3337#issuecomment-63600545
  
    I propose to handle all the possible integer gracefully. Joblib's semantics 
is not perfect. Positive numbers bigger than the number of CPUs are not 
validated and  zero has no proper meaning. It's also not intuitive why a 
negative n_jobs leads to `n_cpus + 1 + n_jobs` instead of `n_cpus + n_jobs`. 
When there are more jobs than available CPUs, over-subscription reduces overall 
performance.
    
    Here's a better integrated semenatics: `min(n_cpus, n_jobs > 0 ? n_jobs : 
n_cpus - n_jobs)`. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to