-
Notifications
You must be signed in to change notification settings - Fork 179
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
chore: initial refactoring of incremental spmd algos #2248
base: main
Are you sure you want to change the base?
chore: initial refactoring of incremental spmd algos #2248
Conversation
/intelci: run |
1 similar comment
/intelci: run |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 know this is still a WIP, but maybe we should have a chat about strategy?
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
/intelci: run |
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'll be honest, the get_backend stuff just seems to be a headache through and through. Small stuff but overall really good work.
@@ -71,8 +71,9 @@ def __init__(self, result_options="all"): | |||
|
|||
def _reset(self): | |||
self._need_to_finalize = False | |||
self._partial_result = self._get_backend( | |||
"basic_statistics", None, "partial_compute_result" | |||
# Not supported with spmd policy so IncrementalBasicStatistics must be specified |
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.
Love the comment
"basic_statistics", None, "partial_compute_result" | ||
# Not supported with spmd policy so IncrementalBasicStatistics must be specified | ||
self._partial_result = IncrementalBasicStatistics._get_backend( | ||
IncrementalBasicStatistics, "basic_statistics", None, "partial_compute_result" |
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.
@@ -40,7 +40,7 @@ def test_on_gold_data(queue, is_deterministic, whiten, num_blocks, dtype): | |||
|
|||
result = incpca.finalize_fit() | |||
|
|||
transformed_data = incpca.predict(X, queue=queue) | |||
transformed_data = incpca.transform(X, queue=queue) |
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.
Just for conformance purposes to sklearn (though not strictly necessary in the onedal folder)?
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.
exactly - pca predict does not exist in sklearn so would prefer to not use this convention if possible
Co-authored-by: Ian Faust <[email protected]>
/intelci: run |
Description
Specifies class name to invoke _get_backend, and _get_policy in the event that this is not supported for the spmd class. Allows removal of duplicate code for incremental spmd algos, and utilization of onedal4py pca transform. Also adds transform function to onedal4py PCA because scikit-learn PCA does not have a predict function, so transform was added and redirects to predict.
PR should start as a draft, then move to ready for review state after CI is passed and all applicable checkboxes are closed.
This approach ensures that reviewers don't spend extra time asking for regular requirements.
You can remove a checkbox as not applicable only if it doesn't relate to this PR in any way.
For example, PR with docs update doesn't require checkboxes for performance while PR with any change in actual code should have checkboxes and justify how this code change is expected to affect performance (or justification should be self-evident).
Checklist to comply with before moving PR from draft:
PR completeness and readability
Testing
Performance