Move more "experimental" backends to its own library
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).
I like this. I've been getting pytorch in my environments when I'm not using it, which is needlessly heavy.
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
idk, i'm just reporting what I've seen
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.