polymath icon indicating copy to clipboard operation
polymath copied to clipboard

added tensorflow requirement

Open mgiraldo opened this issue 2 years ago • 2 comments

analysis was failing with a module not found error for tensorflow. unsure of what version is the preferred though

edit:

  • i was getting an illegal hardware instruction after installing tensorflow this way
  • i'm using an M1 mac and i noticed there's a special tensorflow for apple silicon so i went ahead and installed that
  • this stopped giving me that error but now i got module compiled against api version 0x10 but this version of numpy is 0xe which seems to imply the wrong numpy version

after these version fixes it started working (with a few warnings) but i didn't want to amend the PR since they apply only to apple silicon

mgiraldo avatar Feb 08 '23 22:02 mgiraldo

Tensorflow will be pulled in as a transitive requirement by the other libraries though.

akx avatar Feb 09 '23 07:02 akx

that didn't happen in my environment though. I had to add it to the requirements for it to work 🤷‍♂️

mgiraldo avatar Feb 09 '23 15:02 mgiraldo

that didn't happen in my environment though. I had to add it to the requirements for it to work 🤷‍♂️

Same for me. I had to install tensorflow-mac Also, re: numpy, I had to manually install the correct version using pip3.9 install numpy==1.23.0 --force Your pip command might be different... I have a whole mess of python installs on my system so I had to explicitly use 3.9.

I did get it working eventually! Two bugs make it tough to use (output files are always same length as original even with tempo change, and wav doesnt appear to work for me), but I will report those as issues once I can provide simple steps to replicate.

eljeff avatar Feb 10 '23 00:02 eljeff

my requirements.txt ended up being:

crepe==0.0.13
librosa==0.9.2
numpy>=1.23
pyrubberband==0.3.0
sf_segmenter==0.0.2
soundfile==0.11.0
yt_dlp==2023.1.6
demucs==4.0.0
tensorflow-macos
tensorflow-metal

mgiraldo avatar Feb 10 '23 02:02 mgiraldo

The 3.9 requirement will be fixed by https://github.com/samim23/polymath/pull/2/commits/3c1a2a29db93695955968eb0f4c3bb6b8bb4afac in my PR (numpy 1.20.0 is positively ancient).

akx avatar Feb 10 '23 06:02 akx

hey, thanks for this very useful discussion! I'm included to keep the requirements.txt platform agnostic. I included a "how to install on mac" section in the readme, which includes your tips. Thanks for pointing this out!

samim23 avatar Feb 11 '23 20:02 samim23

@eljeff You mentioned "and wav doesnt appear to work for me", can you give me a hint what does not work? would be awesome to get that fixed!

samim23 avatar Feb 11 '23 21:02 samim23

@eljeff You mentioned "and wav doesnt appear to work for me", can you give me a hint what does not work? would be awesome to get that fixed!

Fixed in https://github.com/samim23/polymath/pull/8

eljeff avatar Feb 11 '23 21:02 eljeff