Skip to content

RFC: require alternative backends to pass SciPy's tests when "dispatching"? #21031

@lucascolley

Description

@lucascolley

See #21012 (comment), #21012 (review).

Support for alternative backends which uses the method of "dispatching" (i.e. calling out to some known alternative backends based on the type of the input), like that in special currently, can be tested in one of (at least) two ways.

  1. Leave the thorough testing of correctness to the alternative backends. Add some more simple tests that reassure us that the correct functions are being called. Direct any bug reports for corner-cases of an alternative backend to the library of that backend.
  2. Convert all of SciPy's tests to be array-agnostic so that we can be sure that alternative backends are providing an accurate match of the SciPy functions. This will enable us to track where alternative backends do not match via skips/x-fails.

We don't yet have agreement on what to do at the moment.


My opinion is that (1) is absolutely fine while the behaviour is experimental and opt-in via an env variable. Any users who are going out of their way to help us test this experimental dispatching should be smart enough to send bug reports to the appropriate library, rather than to us. I think that our time is better spent on covering more of the codebase with support for alternative backends, than on converting tests to find issues in other libraries.

I think that (2) would be nice to have by the time we decide to make this behaviour the default, if only to help reduce the amount of bug reports, but hopefully the onus would still be on the other libraries to track down and fix the bugs in their implementations.

cc @ev-br @mdhaber @rgommers

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRequest for Comments; typically used to gather feedback for a substantial change proposalarray typesItems related to array API support and input array validation (see gh-18286)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions