csteinmetz1 / auraloss

Collection of audio-focused loss functions in PyTorch
Apache License 2.0
695 stars 66 forks source link

Can librosa not be a strict dependency? #36

Closed turian closed 1 year ago

turian commented 1 year ago

Given different versions of OSes with different versions of librosa, librosa is a huge pain to install on certain machines.

For example, I use lambdalabs GPUs and the librosa is wrong. This old librosa depends upon a particular pinned version of numba that's a huge pain to install:

ImportError: Numba needs NumPy 1.22 or less

Thus, I think librosa should be deprecated.

csteinmetz1 commented 1 year ago

Hey @turian. Thanks for raising this. I think we can add librosa as an optional dependency since its only needed for the mel filterbanks. Is scipy also a problem for you? I think we could move to be optional as well potentially.

csteinmetz1 commented 1 year ago

If you want to take a look, I have started a branch that moves librosa and scipy to optional install by default.

turian commented 1 year ago

scipy is generally fine. Just librosa with it's weird numba pin sucks so much.

turian commented 1 year ago

I am happy the beta test when the branch is ready!

csteinmetz1 commented 1 year ago

Great, could you give the librosa branch a try? I did some basic testing and things seemed to be working for me.

turian commented 1 year ago
pip3.8  install --upgrade git+https://github.com/csteinmetz1/auraloss.git@librosa

appears to work. If you submit a PR, I can also code review the diff if you like

csteinmetz1 commented 1 year ago

Thanks, see #37.

csteinmetz1 commented 1 year ago

Should be solved with #37 now and merged to main.