Skip to content

Update sklearnex gpu to use array_api_dispatch and dpnp#218

Draft
ethanglaser wants to merge 2 commits into
IntelPython:mainfrom
ethanglaser:dev/eglaser-array-api-gpu
Draft

Update sklearnex gpu to use array_api_dispatch and dpnp#218
ethanglaser wants to merge 2 commits into
IntelPython:mainfrom
ethanglaser:dev/eglaser-array-api-gpu

Conversation

@ethanglaser

Copy link
Copy Markdown
Contributor

Description


Checklist:

Completeness and readability

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes or created a separate PR with updates and provided its number in the description, if necessary.
  • Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • I have resolved any merge conflicts that might occur with the base branch.

Testing

  • I have run it locally and tested the changes extensively.
  • All CI jobs are green or I have provided justification why they aren't.
  • I have extended testing suite if new functionality was introduced in this PR.

Comment thread README.md
conda env create -n rapids --solver=libmamba -f envs/conda-env-rapids.yml
```

GPU benchmarks using `sklearnex`'s `device: gpu` rely on scikit-learn's Array API support (`array_api_dispatch`), which requires `SCIPY_ARRAY_API=1` to be set in the environment before running:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like it could be set inside the python process instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could but I don't think this is a great way to handle it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ethanglaser What would be the downside?

and getattr(estimator_instance, "probability") == False
):
y_pred_proba = convert_to_numpy(estimator_instance.predict_proba(x))
# GPU/float32 predict_proba rows may drift outside roc_auc_score's

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fixed in sklearnex instead. There is a code branch like this for random forests. If it happens for other classes, needs to be added for them too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants