Spijkervet / CLMR

Official PyTorch implementation of Contrastive Learning of Musical Representations
https://arxiv.org/abs/2103.09410
Apache License 2.0
309 stars 48 forks source link

colab installation broken (dependencies) #22

Open fducau opened 1 year ago

fducau commented 1 year ago

Hi! It seems there is some dependency issue going on. I've been troubleshooting locally with no luck.

When running the installation bit of the colab notebook I'm getting the following:

  Preparing metadata (setup.py) ... done
ERROR: Could not find a version that satisfies the requirement torch==1.9.0 (from clmr) (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1)
ERROR: No matching distribution found for torch==1.9.0

Currently investigating a good dependency configuration for this repo. Info welcome.

fducau commented 1 year ago

I found a combination of packages that seems to be working well:

python = "^3.10"
torch = "1.12.0"
torchaudio = "0.12.0"
pytorch-lightning = "1.9.0"
torchaudio-augmentations = "0.2.4"
simclr = "1.0.2"
torch-pitch-shift = "1.2.4"
soundfile = "^0.12.1"
matplotlib = "^3.7.1"
scikit-learn = "^1.2.2"

All tests passing:

> ~/clmr$ poetry run pytest
============================================================================ test session starts =============================================================================
platform linux -- Python 3.10.6, pytest-7.3.1, pluggy-1.0.0
rootdir: /my-repos-path/clmr
collected 4 items                                                                                                                                                            

tests/test_audioset.py .                                                                                                                                               [ 25%]
tests/test_dataset.py ..                                                                                                                                               [ 75%]
tests/test_spectogram.py .                                                                                                                                             [100%]

============================================================================= 4 passed in 4.05s ==============================================================================
piyushdash94 commented 2 months ago

I want to implement the CLMR model for genre detection on GTZAN dataset and and then try to tweak the architecture a bit maybe. Can someone please help?