Skip to content

Fixes Array API with onnxruntime #3

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

Merged
merged 10 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unnecessary code
  • Loading branch information
xadupre committed Jun 4, 2023
commit 902ba2523ec24ec79edd74701ee068f34ad1d08f
12 changes: 0 additions & 12 deletions _unittests/ut_npx/test_sklearn_array_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,11 @@
DEFAULT_OPSET = onnx_opset_version()


def take(self, X, indices, *, axis):
# Overwritting method take as it is using iterators.
# When array_api supports `take` we can use this directly
# https://github.com/data-apis/array-api/issues/177
X_np = self._namespace.take(X, indices, axis=axis)
return self._namespace.asarray(X_np)


class TestSklearnArrayAPI(ExtTestCase):
def test_sklearn_array_api_linear_discriminant(self):
from sklearn.utils._array_api import _ArrayAPIWrapper

_ArrayAPIWrapper.take = take
X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]])
y = np.array([1, 1, 1, 2, 2, 2])
ana = LinearDiscriminantAnalysis()
ana = LinearDiscriminantAnalysis()
ana.fit(X, y)
expected = ana.predict(X)

Expand Down
10 changes: 0 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,6 @@ jobs:
- script: |
python -m pytest -v
displayName: 'Runs Unit Tests'
- script: |
python -u setup.py bdist_wheel
displayName: 'Build Package'
#- script: |
# python -m sphinx _doc dist/html
# displayName: 'Builds Documentation'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'wheel-linux-$(python.version)'
targetPath: 'dist'

- job: 'TestLinux'
pool:
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy