Skip to content

Unpin NumPy 2 and do necessary changes #235

@seberg

Description

@seberg

Right now legate-boost pins to numpy<2 maybe just unnecessarily due to test failure.

The problem is a chain of things:

  • legate-boost subclasses sklearn
  • sklearns score method (unintentionally) uses partial Array API related logic (specifically it checks .device). Maybe only in an effort to give a nicer error message.
  • On numpy < 2 those checks are just irrelevant, but on numpy >= 2 they trigger because cupynumeric don't have array.device == "cpu"

If we can create a more minimal reproducer, this is probably actually an skimage bug, because skimage shouldn't be sensitive to this type of thing without user opt-in.
On the one hand, that may be in the future, on the other hand such details are probably also still up to change in sklearn before removing the need for opt-in.

The simplest thing is to decide that just don't expect a legate estimator to work with NumPy inputs to .score() or convert to cupynumeric first to work around it (until sklearn may have changed their behavior).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions