-
Notifications
You must be signed in to change notification settings - Fork 184
WIP: Enable array api support in neighbor #2700
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
Open
yuejiaointel
wants to merge
150
commits into
uxlfoundation:main
Choose a base branch
from
yuejiaointel:refactor_neighbor_array_api
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.
+897
−469
Open
Changes from all commits
Commits
Show all changes
150 commits
Select commit
Hold shift + click to select a range
0e7253e
refactor: move/delete some methods in neighbors.py
yuejiaointel dd0a1b8
fix: try it again
yuejiaointel 396d8b0
fix: try it again
yuejiaointel ee573d3
fix: try it again
yuejiaointel 6c7a140
fix: first round of refactor move preprocssing function to sklearnex
yuejiaointel 79cd77e
fix: fix shape
yuejiaointel e580a7b
rebase: rebase to main
yuejiaointel 87fe40c
fix: add fit emthod logic in onedla
yuejiaointel a8ec297
fix: fix test
yuejiaointel 44b6e95
fix: fix tupleerror
yuejiaointel 8822854
fix: fix tuple issue
yuejiaointel cc909bc
print: print fit_x
yuejiaointel 46c7759
fix: fixed tuple
yuejiaointel 61c9fe2
fix: fix tuple
yuejiaointel 48c5301
print: print in save attributes
yuejiaointel 375666e
fix: tuple handling
yuejiaointel b896e94
print: add print
yuejiaointel b620628
print: test print
yuejiaointel 061558e
test: test fix for typle
yuejiaointel d224279
fix: more print
yuejiaointel fdd59a4
fix: test fix for tuyple issue
yuejiaointel d9ddb36
fix: test fix for tuyple issue
yuejiaointel b8118df
fix: try add validation
yuejiaointel 15436d8
fix: try restore neighbors funcitons
yuejiaointel 704f550
fix: test restore
yuejiaointel 6c3df79
fix: restore again
yuejiaointel 0e4280f
fix: restpore
yuejiaointel ad3f210
fix: restore ad and add print
yuejiaointel b08b302
fix: restore ad and add print
yuejiaointel a5279e3
fix: fix test as well
yuejiaointel 76f7b06
fix: fix test
yuejiaointel 00459ee
fix: comment out validate data
yuejiaointel ad41e3f
fix: refactoredclassifier prepressing to sklearnex
yuejiaointel 88bef92
fix: add vlaidate data and see if it fix attributeerror
yuejiaointel 2c8add1
fix: fix onedal test
yuejiaointel a858828
fix: dpm
yuejiaointel 8ff20ee
fix: refacto validate n classes
yuejiaointel 8b8bab2
fix: refacor kneighbors validation
yuejiaointel c705ed5
fix: add vlaidation data to rest of the functions
yuejiaointel b3d5b88
fix: fix check n neighbors validation before check is fitted
yuejiaointel 5ef2fcb
fix: fix when predict(none) is called by adding x is not none check
yuejiaointel 89f72fc
fix: fix lof
yuejiaointel fbea2da
fix: add validation in kneihbors for lof
yuejiaointel e12a896
fix: remove count valitation in onedal
yuejiaointel a1840a2
fix: refactor shape
yuejiaointel 04e6b1a
refactor: neighbors processing logic to skleranex
yuejiaointel 8042448
fix: validationeighbors < samples after +1
yuejiaointel ab8af22
fix: fix assertion error
yuejiaointel 67d4a38
fix: fix asswertion error by dispatch gpu/skl in sklearnex
yuejiaointel 093bbca
refacor: onedal prediciton entirely to sklearnex
yuejiaointel 8cb4712
feature: array api in common.py
yuejiaointel 2388ef0
fix: assertion error
yuejiaointel a046838
feature: add array api support to knn skleranex files
yuejiaointel 49b0774
fix: compatiibilty for array api
yuejiaointel a587bbc
fix: remove validate data tests from deseleted tests
yuejiaointel 5308d92
fix: format
yuejiaointel 261f8f8
fix: remove ensure finite and reformat
yuejiaointel a1d22c1
fix: format
yuejiaointel c3629f0
fix: fix patching type error
yuejiaointel 9b41267
fix: update doc
yuejiaointel 2d28e32
fix: fix patching error
yuejiaointel fc978fd
fix: attribute error
yuejiaointel a45c7ed
fix: patchnig AttributeError
yuejiaointel bb48123
fix: remove print and commented code
yuejiaointel 773fb7c
fix: format
yuejiaointel c102649
fix: fix conformance test
yuejiaointel c03bdbd
fix: format
yuejiaointel 26b3f69
fix: clean up unneeded var
yuejiaointel b9fb65a
fix: attributeerror
yuejiaointel 600adea
fix: spmd also use skelarnex neighbors
yuejiaointel e9e9d8c
test: test without classes_check in onedal neighbor
yuejiaointel 17eb4c5
fix: spmd issue
yuejiaointel f84b197
fix: format
yuejiaointel 0bece91
fix: make sure y is numeric in regrresor
yuejiaointel 790372c
fix: fix spmd test
yuejiaointel 62a51de
fix: common tests
yuejiaointel d99bec1
fix: spmd issues
yuejiaointel 25e16a7
fix: format
yuejiaointel c7f3aba
fix: fix metric value
yuejiaointel e9ae663
fix: stability test
yuejiaointel 7c69298
fix: test
yuejiaointel 5a69e86
fix: fix patching error
yuejiaointel 0123220
fix: spmd preduct
yuejiaointel 913b489
fix: validate y for regressor
yuejiaointel f2f6de5
test: try regressor without ynumric but verify it ouside validate dat
yuejiaointel f28700a
fix: foloow ridge patten ensure y numberic requrie ksnearln >=1.5
yuejiaointel cd6be2c
fix: test without manual convertion
yuejiaointel 705b334
fix: add violation back
yuejiaointel 98ca37e
fix: add rst back
yuejiaointel 655cd99
fix: add the dunmmy check back
yuejiaointel da026d2
fix: fix the reshape
yuejiaointel a021dc6
fix: add post processing to onedal
yuejiaointel dbc899c
fix: kneighbors
yuejiaointel 72ca287
Merge branch 'main' into refactor_neighbor_array_api
yuejiaointel 1c339a5
fix: remove post prossing from skelarnex
yuejiaointel c60c3dd
fix: format
yuejiaointel 0818dcb
fix: format
yuejiaointel 3f096b0
fix: fix spmd
yuejiaointel 7fad6cc
fix: fix spmd test
yuejiaointel f784db2
fix: format
yuejiaointel 221b822
fix: lof tests
yuejiaointel c568a9a
fix: format
yuejiaointel 06010d0
fix: fix example test
yuejiaointel 0c51482
fix: fix spmd neighbor again with runtime lookup
yuejiaointel fd1c499
fix: spmd synetic test
yuejiaointel 05d27c4
fix: lof case
yuejiaointel 6132976
fix: format
yuejiaointel 9c59b66
fix: address past comments again except refactoring
yuejiaointel fe558f3
fix: dtype
yuejiaointel 6b8d8f8
fix: fix check onedal estimator
yuejiaointel 4efd964
fix: remove unused function and refactoring
yuejiaointel e457590
fix: change to hasattr
yuejiaointel 0a21734
fix: bring some funcitons back
yuejiaointel 7f21c86
fix: format
yuejiaointel 65996fe
fix: remove comments
yuejiaointel 2774fe4
fix: performance
yuejiaointel 80c0ba8
fix: add validation
yuejiaointel 3d2bc5b
fix: validate data
yuejiaointel f872b88
fix: validate data
yuejiaointel 6f8bd2a
fix: validate data
yuejiaointel bdd5411
fix: validate data
yuejiaointel c6500f0
fix: validate data
yuejiaointel c1c6cfc
fix: validate data
yuejiaointel e2580ba
fix validate
yuejiaointel 1d45b8c
fix: performnace
yuejiaointel d77b866
fix: validate data
yuejiaointel c1981cb
fix: performance
yuejiaointel 7ee0ae2
fix: performance and add spmd array api dispatch flag
yuejiaointel 46b7562
fix: gpu errors
yuejiaointel 81b0c0b
fix: comments
yuejiaointel 7a0f72d
fix: gpu
yuejiaointel 3b5801d
fix: fix spmd
yuejiaointel 444aa3f
fix: added onedal device offload changes in #2940
yuejiaointel b677cf6
fix: comments
yuejiaointel 15c7c3c
fix: comments
yuejiaointel 44b1c4e
fix: get array from namespace for gpu data
yuejiaointel ac959d7
fix: comments
yuejiaointel be92806
fix: device offload with standalone functions to hanlde converstion
yuejiaointel e662a1f
revert: restore onedal/_device_offload.py to main (defer to #2940)
yuejiaointel 3e239e8
fix: add multi output true
yuejiaointel b0273e9
fix: let non sycl arrays gpu input fall back to sklearn
yuejiaointel cd77d8d
fix: simpliy unique_inverse
yuejiaointel 03c0df8
fix: reverse as numpy < 2.0 does not have np.unqieu_inverse
yuejiaointel 6b695c2
Fix unique_inverse result unpacking for Python 3.13 compatibility
yuejiaointel 65421a3
fix: allow numpy arrays in _onedal_gpu_supported for dpctl/dpnp path
yuejiaointel f024233
fix: ondal support
yuejiaointel 0a9f7e9
fix: gpu test
yuejiaointel e642455
fix: format
yuejiaointel afc6e84
fix: comments
yuejiaointel daaf10a
fix: gpu test
yuejiaointel 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
Oops, something went wrong.
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.
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.
If this now runs on GPU, then please add it to the support table in
algorithms.rst.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 don't think it does, but this list is not exclusively GPU algorithms
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.
@yuejiaointel @ethanglaser I have it a try and both onedal and sklearnex report that it runs on GPU:
But some things I'm not clear whether they are CPU or GPU:
@Alexandr-Solovev @Vika-F Could you comment on what's the status of GPU support for LocalOutlierFactor?
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.
We currently don’t have a native LocalOutlierFactor implementation in oneDAL. There is a CPU-only implementation in the legacy DAAL part, but it is not exposed through oneAPI interfaces. As a result, GPU support for LocalOutlierFactor is not available.
For reference:
scikit-learn-intelex/sklearnex/neighbors/_lof.py
Line 86 in bf43701
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.
It looks like it'd be very easy to port those python parts to array API to run them on GPU, since they only do slicing and max ops.
@Alexandr-Solovev Do I understand it correctly from the logs above that all the operations offloaded to oneDAL are running on GPU?
Example:
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.
yes, all of the operations offloaded to oneDAL from the kernel_profiler log are executed on GPU