pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Move more "experimental" backends to its own library

Open ricardoV94 opened this issue 4 months ago • 4 comments

Description

We have some limited support for PyTorch and coming up MLX, which are at a stage where they don't yet integrate well enough with PyTensor in general.

I suggest we create a separate package pytensor-backends for these. That way development stays more focused and we don't need to test for every PR to main. User experience would still be similar, except when they do pytensor.function(..., mode="PYTORCH") we try to import the pytensor-backends library and if missing tell user to go about installing it (together with the backend library).

ricardoV94 avatar Aug 01 '25 09:08 ricardoV94

I like this. I've been getting pytorch in my environments when I'm not using it, which is needlessly heavy.

jessegrabowski avatar Aug 01 '25 10:08 jessegrabowski

I like this. I've been getting pytorch in my environments when I'm not using it, which is needlessly heavy.

Why though? It's optional dependency and tests skip gracefully if the library is not installed

ricardoV94 avatar Aug 01 '25 13:08 ricardoV94

idk, i'm just reporting what I've seen

jessegrabowski avatar Aug 01 '25 14:08 jessegrabowski

Should we make it a more general repo analogous to pymc-extras for anything that is experimental or narrowly-applicable: pytensor-extras? Backends seem like a pretty core feature in general, so it seems strange to spin them all out into a separate library.

fonnesbeck avatar Aug 06 '25 21:08 fonnesbeck