captum icon indicating copy to clipboard operation
captum copied to clipboard

Add support for numpy 2.0+

Open bpleshakov opened this issue 10 months ago • 2 comments

🚀 Feature

Actually, the title. Right now captum has a constraint numpy<2.0 for no apparent reason

Motivation

I want to use captum with modern versions of numpy in the same env.

bpleshakov avatar Jun 11 '25 13:06 bpleshakov

Related pull request: pytorch/captum#1580 Captum itself has no problem supporting NumPy 2.x, as was the case with Captum v0.7.0. The major problem is that the current version of Captum still supports PyTorch <2.3.0, which is incompatible with NumPy 2.x and causes the test builds to fail.

aywi avatar Jun 11 '25 16:06 aywi

@aywi @bpleshakov thank you for the suggestion and investigating the reason. we will consider stop supporting legacy deps in our next release

cc @craymichael @vivekmig

aobo-y avatar Jun 11 '25 21:06 aobo-y

Maybe this is obvious but lack of numpy 2.x suport means no python 3.13 support either as numpy numpy >=2.1 is required for python 3.13

jhovell avatar Sep 23 '25 20:09 jhovell

This is currently breaking our builds in some cases (a lot of requirements apart from Captum) and also stalls Python 3.13 migration. In fact, many libraries started requiring Numpy 2.x quite a bit ago, and this causes our whole stack to be outdated. What is stopping the PR from being merged and released?

j-adamczyk avatar Oct 13 '25 13:10 j-adamczyk