|
| 1 | +dataset_name = "chords_data" |
| 2 | +embeddings_dir = "/gpfs/projects/upf97/embeddings_ssl/" |
| 3 | + |
| 4 | +# Lighting Trainer parameters, overwrites the training config |
| 5 | +predict.device_dict = { |
| 6 | + "accelerator": "gpu", |
| 7 | + "devices": 1, |
| 8 | + "num_nodes": 1, |
| 9 | +} |
| 10 | + |
| 11 | +# Embedding taking location from the neural network |
| 12 | +predict.embedding_layer = [6, 11] |
| 13 | +predict.overlap_ratio = 0.5 |
| 14 | + |
| 15 | +predict.embeddings_dir = %embeddings_dir |
| 16 | +predict.dataset_name = %dataset_name |
| 17 | + |
| 18 | +# Audio Loader for embedding extraction |
| 19 | +AudioEmbeddingDataModule.data_dir = "/gpfs/projects/upf97/downstream_datasets/chords_data/" |
| 20 | +AudioEmbeddingDataModule.file_format = "mp3" |
| 21 | +AudioEmbeddingDataModule.num_workers = 20 |
| 22 | +AudioEmbeddingDataModule.batch_size = 32 |
| 23 | +AudioEmbeddingDataModule.overlap_ratio = 0.5 |
| 24 | +AudioEmbeddingDataModule.n_seconds = 30 |
| 25 | +AudioEmbeddingDataModule.last_chunk_ratio = 0.1 |
| 26 | + |
| 27 | + |
| 28 | +build_module_and_datamodule.dataset_name = %dataset_name |
| 29 | +build_module_and_datamodule.embeddings_dir = %embeddings_dir |
| 30 | + |
| 31 | +MTTEmbeddingLoadingDataModule.gt_path = "/data0/palonso/ssl-mtg/downstream_datasets/magnatagatune/metadata/mtat/binary.npy" |
| 32 | +MTTEmbeddingLoadingDataModule.train_filelist = "/data0/palonso/ssl-mtg/downstream_datasets/magnatagatune/metadata/mtat/train.npy" |
| 33 | +MTTEmbeddingLoadingDataModule.val_filelist = "/data0/palonso/ssl-mtg/downstream_datasets/magnatagatune/metadata/mtat/valid.npy" |
| 34 | +MTTEmbeddingLoadingDataModule.test_filelist = "/data0/palonso/ssl-mtg/downstream_datasets/magnatagatune/metadata/mtat/test.npy" |
| 35 | +MTTEmbeddingLoadingDataModule.batch_size = 64 |
| 36 | +MTTEmbeddingLoadingDataModule.num_workers = 10 |
| 37 | +MTTEmbeddingLoadingDataModule.layer_aggregation = "none" |
| 38 | +MTTEmbeddingLoadingDataModule.granularity = "chunk" |
| 39 | +MTTEmbeddingLoadingDataModule.time_aggregation = "mean" |
| 40 | + |
| 41 | +train_probe.wandb_params = { |
| 42 | + "project": "magnatagatune", |
| 43 | + "offline": False, |
| 44 | + "entity": "mtg-upf", |
| 45 | + "save_dir": "/data0/palonso/ssl-mtg/logs/", |
| 46 | +} |
| 47 | + |
| 48 | +train_probe.train_params = { |
| 49 | + "accelerator": "gpu", |
| 50 | + "devices": 1, |
| 51 | + "log_every_n_steps": 50, |
| 52 | + "max_steps": 20000, |
| 53 | + "num_sanity_val_steps": 0, |
| 54 | + "check_val_every_n_epoch": 1, |
| 55 | +} |
| 56 | +train_probe.monitor = "val-MAP-macro" |
| 57 | +train_probe.monitor_mode = "max" |
| 58 | + |
| 59 | +optimize_probe.bound_conditions = { |
| 60 | + "hidden_size": (64, 1024), |
| 61 | + "dropout": (0.0, 0.5), |
| 62 | + "lr": (1e-5, 1e-3), |
| 63 | +} |
| 64 | +# Other parameters to optimize: |
| 65 | +# "max_epochs": (10, 100) |
| 66 | +# "batch_size": (32, 128) |
| 67 | + |
| 68 | +optimize_probe.optim_process = False |
| 69 | +optimize_probe.init_points = 5 |
| 70 | +optimize_probe.n_iter = 50 |
| 71 | +optimize_probe.seed = 1 |
| 72 | + |
| 73 | +# Warning: these parameters are ignored when the the Bayesian optimization is enabled |
| 74 | +SequenceMultiLabelClassificationProbe.num_layers = 2 |
| 75 | +SequenceMultiLabelClassificationProbe.hidden_size = 512 |
| 76 | +SequenceMultiLabelClassificationProbe.dropout = 0.2 |
| 77 | +SequenceMultiLabelClassificationProbe.lr = 0.0001 |
| 78 | + |
| 79 | +SequenceMultiLabelClassificationProbe.activation = "relu" |
| 80 | +SequenceMultiLabelClassificationProbe.bias = True |
| 81 | +SequenceMultiLabelClassificationProbe.num_labels = 50 |
| 82 | +SequenceMultiLabelClassificationProbe.labels = "/data0/palonso/ssl-mtg/downstream_datasets/magnatagatune/metadata/mtat/tags.npy" |
| 83 | + |
| 84 | +# CosineAnnealing scheduler |
| 85 | +CosineAnnealingCallback.warmup_steps = 2000 |
| 86 | +CosineAnnealingCallback.eta_min = 1e-7 |
0 commit comments