-
Notifications
You must be signed in to change notification settings - Fork 182
[bugfix, enhancement] Address affinity bug by using threadpoolctl/joblib for n_jobs dispatching #2364
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
Draft
icfaust
wants to merge
51
commits into
uxlfoundation:main
Choose a base branch
from
icfaust:dev/njobs_fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[bugfix, enhancement] Address affinity bug by using threadpoolctl/joblib for n_jobs dispatching #2364
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
c78859f
Update _n_jobs_support.py
icfaust e207110
Update test_run_to_run_stability.py
icfaust 043b09d
Update test_n_jobs_support.py
icfaust 66b0b6d
add changes
icfaust bc66055
add other changes
icfaust 280c0e0
add an affinity test
icfaust eb0df7f
reduce lines
icfaust 2403e6d
use pylance
icfaust 009348b
further fixes
icfaust 29c318f
better docs
icfaust ed726de
better docs
icfaust 2b58453
mark
icfaust 78d07bb
Update _n_jobs_support.py
icfaust 8da0891
Update _n_jobs_support.py
icfaust 79ced00
Update test_n_jobs_support.py
icfaust e021335
Update _n_jobs_support.py
icfaust 30f822a
Update test_n_jobs_support.py
icfaust 6d02aea
Update _n_jobs_support.py
icfaust 84f91ac
Update test_n_jobs_support.py
icfaust a2a499a
Update _n_jobs_support.py
icfaust ac16042
Update _n_jobs_support.py
icfaust e6fdd80
Update incremental_linear.py
icfaust 04075dc
Update incremental_ridge.py
icfaust dd798fa
Update test_n_jobs_support.py
icfaust 70d613e
Update _n_jobs_support.py
icfaust 1b121a5
Update test_run_to_run_stability.py
icfaust 7bd1fcb
Merge branch 'uxlfoundation:main' into dev/njobs_fix
icfaust bbb2337
Update test_run_to_run_stability.py
icfaust a3ceaf3
Update requirements-test.txt
icfaust 97a906f
Update requirements-test.txt
icfaust 1948e7d
Update requirements-test.txt
icfaust 62c7d9f
Update requirements-test.txt
icfaust ce79ace
Update requirements-test.txt
icfaust 8765c0a
Merge branch 'main' into dev/njobs_fix
icfaust e2fa126
return values, and reduce test
icfaust 1ca56cd
Merge branch 'uxlfoundation:main' into dev/njobs_fix
icfaust ab1c1eb
Merge branch 'uxlfoundation:main' into dev/njobs_fix
icfaust e9b5da5
Merge branch 'uxlfoundation:main' into dev/njobs_fix
icfaust f979da3
Merge branch 'uxlfoundation:main' into dev/njobs_fix
icfaust b56729e
Merge branch 'uxlfoundation:main' into dev/njobs_fix
icfaust 2b2749c
Update data_conversion.cpp
icfaust 3f0155b
Update table.cpp
icfaust 385ad80
Merge branch 'uxlfoundation:main' into dev/njobs_fix
icfaust 052bcdd
Update data_conversion.cpp
icfaust c638473
Update test_memory_usage.py
icfaust e00feb3
Update _n_jobs_support.py
icfaust 627df75
Merge branch 'uxlfoundation:main' into dev/njobs_fix
icfaust 3bf60b5
Merge branch 'uxlfoundation:main' into dev/njobs_fix
icfaust df38221
Update test_n_jobs_support.py
icfaust 51ccef3
Update run_test.sh
icfaust 17de438
Update ci.yml
icfaust File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,7 +113,7 @@ class IncrementalRidge(MultiOutputMixin, RegressorMixin, oneDALEstimator, BaseEs | |
"fit_intercept": ["boolean"], | ||
"alpha": [Interval(numbers.Real, 0, None, closed="left")], | ||
"copy_X": ["boolean"], | ||
"n_jobs": [Interval(numbers.Integral, -1, None, closed="left"), None], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reviewers: let me know if I should remove n_jobs from this and the other estimator entirely in order to minimize maintenance cost (all other estimators get the kwarg from _n_jobs_support.py, so far that I see). |
||
"n_jobs": [numbers.Integral, None], | ||
"batch_size": [Interval(numbers.Integral, 1, None, closed="left"), None], | ||
} | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this setting would apply globally, which could lead to race conditions if users call this in parallel, for example through some framework that would parallelize estimator calls.
Could it somehow get a mutex (or use atomic ops) either here or on the oneDAL side?
Also, would be better to add a warning that the setting is changed at a global level, so that a user would not try to call these inside multi-threaded code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually on a further look, it does already have a mutex on the daal side. Still better to document this behavior being global.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, will do!