Currently, importing MusPy will also import PyTorch and TensorFlow if they are installed. However, this greatly reduces the import speed and often results in unnecessary imports. This pull request proposes to move PyTorch and TensorFlow to separate packages as this seems to be the only way to make optional imports possible. We could have a muspy-pytorch and a muspy-tensorflow package for PyTorch and TensorFlow supports.
Currently, importing MusPy will also import PyTorch and TensorFlow if they are installed. However, this greatly reduces the import speed and often results in unnecessary imports. This pull request proposes to move PyTorch and TensorFlow to separate packages as this seems to be the only way to make optional imports possible. We could have a
muspy-pytorch
and amuspy-tensorflow
package for PyTorch and TensorFlow supports.