aai-institute / pyDVL

pyDVL is a library of stable implementations of algorithms for data valuation and influence function computation
https://pydvl.org
GNU Lesser General Public License v3.0
89 stars 9 forks source link

Include shape in array types #541

Open mdbenito opened 3 months ago

mdbenito commented 3 months ago

Using nptyping and beartype we can pin down the dimensions that we accept. For instance, the constructor of ValuationResult can only accept 1D arrays but we don't enforce that.

Alternatively, jaxtyping supports jax, torch and numpy in one go. But python 3.9 is required so we'd have to wait until EOL for 3.8 at the very least.

Are there any other libraries?

mdbenito commented 1 month ago

@janosg @schroedk this could be a valid reason to expedite deprecation of 3.8