csteinmetz1 / auraloss

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

Can librosa not be a strict dependency? #36

Closed turian closed 1 year ago

turian commented 2 years 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 2 years 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 2 years 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 2 years ago

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

turian commented 2 years ago

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

csteinmetz1 commented 2 years 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 2 years 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 2 years ago

Thanks, see #37.

csteinmetz1 commented 1 year ago

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