payload: {"action":"created","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/14196","repository_url":"https://api.github.com/repos/scikit-learn/scikit-learn","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/14196/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/14196/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/14196/events","html_url":"https://github.com/scikit-learn/scikit-learn/pull/14196","id":460939467,"node_id":"MDExOlB1bGxSZXF1ZXN0MjkxOTYzNTcx","number":14196,"title":"[MRG] Equivalent of effective_n_jobs for OpenMP","user":{"login":"jeremiedbb","id":34657725,"node_id":"MDQ6VXNlcjM0NjU3NzI1","avatar_url":"https://avatars2.githubusercontent.com/u/34657725?v=4","gravatar_id":"","url":"https://api.github.com/users/jeremiedbb","html_url":"https://github.com/jeremiedbb","followers_url":"https://api.github.com/users/jeremiedbb/followers","following_url":"https://api.github.com/users/jeremiedbb/following{/other_user}","gists_url":"https://api.github.com/users/jeremiedbb/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremiedbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremiedbb/subscriptions","organizations_url":"https://api.github.com/users/jeremiedbb/orgs","repos_url":"https://api.github.com/users/jeremiedbb/repos","events_url":"https://api.github.com/users/jeremiedbb/events{/privacy}","received_events_url":"https://api.github.com/users/jeremiedbb/received_events","type":"User","site_admin":false},"labels":[{"id":1393740542,"node_id":"MDU6TGFiZWwxMzkzNzQwNTQy","url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels/High%20Priority","name":"High Priority","color":"321fa3","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":50,"created_at":"2019-06-26T12:24:08Z","updated_at":"2019-10-13T17:02:13Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/14196","html_url":"https://github.com/scikit-learn/scikit-learn/pull/14196","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/14196.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/14196.patch"},"body":"some PRs are waiting for a helper to go from `n_jobs` to the number of threads to set in `prange` (which does not accept None or negative values). (see #13264)\r\n\r\nThis PR proposes an equivalent of joblib.effective_n_jobs but with a different behavior when `n_jobs = None`. In that case OpenMP can use as much threads as possible. It's done using both `omp_get_max_threads` and `joblib.effective_n_jobs` because loky's `effective_n_jobs` is more clever than just returning the cpu_count.\r\n\r\nNot sure about the name though.\r\n\r\ncc @ogrisel @tomMoral "},"comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments/541436167","html_url":"https://github.com/scikit-learn/scikit-learn/pull/14196#issuecomment-541436167","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/14196","id":541436167,"node_id":"MDEyOklzc3VlQ29tbWVudDU0MTQzNjE2Nw==","user":{"login":"tomMoral","id":3321081,"node_id":"MDQ6VXNlcjMzMjEwODE=","avatar_url":"https://avatars0.githubusercontent.com/u/3321081?v=4","gravatar_id":"","url":"https://api.github.com/users/tomMoral","html_url":"https://github.com/tomMoral","followers_url":"https://api.github.com/users/tomMoral/followers","following_url":"https://api.github.com/users/tomMoral/following{/other_user}","gists_url":"https://api.github.com/users/tomMoral/gists{/gist_id}","starred_url":"https://api.github.com/users/tomMoral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomMoral/subscriptions","organizations_url":"https://api.github.com/users/tomMoral/orgs","repos_url":"https://api.github.com/users/tomMoral/repos","events_url":"https://api.github.com/users/tomMoral/events{/privacy}","received_events_url":"https://api.github.com/users/tomMoral/received_events","type":"User","site_admin":false},"created_at":"2019-10-13T17:02:13Z","updated_at":"2019-10-13T17:02:13Z","author_association":"CONTRIBUTOR","body":"> > It is also enforced by MKL and OpenBLAS.\r\n> \r\n> Can you expand a bit please? That seems contradictory with what we say in #15116:\r\n\r\nIn my understanding, for MKL and OpenBLAS, the environment variables are caped by the number of CPUs. The following script, it should not use 100 cpus but the maximal number of cpus available on your machine:\r\n```\r\nOMP_NUM_THREADS=100 python -c \"import numpy as np; A = np.random.rand(10000, 10000); A.dot(A.T)\"\r\n```\r\nbut @jeremiedbb  knows better than me in this matter. This means that we would copy the behavior from `numpy`, which was the original goal.\r\n\r\n> > the documentation issue should not influence the choice\r\n> \r\n> I strongly disagree here. If we can't explain it properly, users won't understand it.\r\n\r\nI agree that it is necessary to be able to explain our API choice but it seems a bit much to say that we won't be able to explain that overall, the maximal number of threads is caped by the number of CPUs.\r\n\r\n"}}
other: {"actor":{"display_login":"tomMoral"}}