8000 FIX dtype handling regression in pairwise distance computation by Shree7676 · Pull Request #29746 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

FIX dtype handling regression in pairwise distance computation #29746

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 2 commits into from
Aug 30, 2024

Conversation

Shree7676
Copy link
Contributor
@Shree7676 Shree7676 commented Aug 30, 2024

Fixed regression introduced in #29639 that caused many CI to fail on pairwise distance tests with float 32 input for example #29674.

Copy link
github-actions bot commented Aug 30, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 55a714e. Link to the linter CI: here

Copy link
Member
@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

This LGTM. For information we debugged it at the EuroScipy 2024 sprint.

@ogrisel
Copy link
Member
ogrisel commented Aug 30, 2024

/cc @lesteve

@lesteve lesteve changed the title Fixed dtype handling regression in pairwise distance computation FIX dtype handling regression in pairwise distance computation Aug 30, 2024
@lesteve lesteve merged commit be8e28d into scikit-learn:main Aug 30, 2024
34 checks passed
@lesteve
Copy link
Member
lesteve commented Aug 30, 2024

Merging this one, thanks!

@conradstevens
Copy link
Contributor

Not sure if this is related but I am getting the following error having merged from upstream. see more detail here 29757.

$ python -m sklearn.gaussian_process._gpr

Traceback (most recent call last):
  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 112, in _get_module_details
  File "/Users/conradstevens/scikit-learn/sklearn/gaussian_process/__init__.py", line 6, in <module>
    from . import kernels
  File "/Users/conradstevens/scikit-learn/sklearn/gaussian_process/kernels.py", line 36, in <module>
    from ..metrics.pairwise import pairwise_kernels
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/__init__.py", line 6, in <module>
    from . import cluster
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/cluster/__init__.py", line 28, in <module>
    from ._unsupervised import (
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/cluster/_unsupervised.py", line 21, in <module>
    from ..pairwise import _VALID_METRICS, pairwise_distances, pairwise_distances_chunked
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/pairwise.py", line 46, in <module>
    from ._pairwise_distances_reduction import ArgKmin
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/_pairwise_distances_reduction/__init__.py", line 97, in <module>
    from ._dispatcher import (
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/_pairwise_distances_reduction/_dispatcher.py", line 11, in <module>
    from .._dist_metrics import (
  File "sklearn/metrics/_dist_metrics.pyx", line 1, in init sklearn.metrics._dist_metrics
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

@lesteve
Copy link
Member
lesteve commented Sep 1, 2024

@conradstevens this is likely not related, it's probably better to keep the discussion in #29757.

MarcBresson pushed a commit to MarcBresson/scikit-learn that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0