forked from facebookresearch/demucs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reproducibility grid and ablation study
- Loading branch information
Showing
8 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
""" | ||
Easier training for reproducibility | ||
""" | ||
|
||
from ._explorers import MyExplorer | ||
|
||
|
||
@MyExplorer | ||
def explorer(launcher): | ||
launcher.slurm_( | ||
gpus=8, | ||
time=3 * 24 * 60, | ||
partition='devlab,learnlab') | ||
|
||
launcher.bind_({'ema.epoch': [0.9, 0.95]}) | ||
launcher.bind_({'ema.batch': [0.9995, 0.9999]}) | ||
launcher.bind_({'epochs': 600}) | ||
|
||
base = {'model': 'demucs', 'demucs.dconv_mode': 0, 'demucs.gelu': False, | ||
'demucs.lstm_layers': 2} | ||
newt = {'model': 'demucs', 'demucs.normalize': True} | ||
hdem = {'model': 'hdemucs'} | ||
svd = {'svd.penalty': 1e-5, 'svd': 'base2'} | ||
|
||
with launcher.job_array(): | ||
for model in [base, newt, hdem]: | ||
sub = launcher.bind(model) | ||
if model is base: | ||
sub(epochs=360) | ||
continue | ||
sub(svd) | ||
sub(svd, seed=43) | ||
if model == newt: | ||
# Ablation study | ||
sub() | ||
abl = sub.bind(svd) | ||
abl({'ema.epoch': [], 'ema.batch': []}) | ||
abl({'demucs.dconv_lstm': 10}) | ||
abl({'demucs.dconv_attn': 10}) | ||
abl({'demucs.dconv_attn': 10, 'demucs.dconv_lstm': 10, 'demucs.lstm_layers': 2}) | ||
abl({'demucs.dconv_mode': 0}) | ||
abl({'demucs.gelu': False}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
""" | ||
Fine tuning experiments | ||
""" | ||
|
||
from ._explorers import MyExplorer | ||
from ..train import main | ||
|
||
|
||
@MyExplorer | ||
def explorer(launcher): | ||
launcher.slurm_( | ||
gpus=8, | ||
time=300, | ||
partition='devlab,learnlab') | ||
|
||
# Mus | ||
launcher.slurm_(constraint='volta32gb') | ||
|
||
grid = "repro" | ||
folder = main.dora.dir / "grids" / grid | ||
|
||
for sig in folder.iterdir(): | ||
if not sig.is_symlink(): | ||
continue | ||
xp = main.get_xp_from_sig(sig) | ||
xp.link.load() | ||
if len(xp.link.history) != xp.cfg.epochs: | ||
continue | ||
sub = launcher.bind(xp.argv, [f'continue_from="{xp.sig}"']) | ||
sub.bind_({'ema.epoch': [0.9, 0.95], 'ema.batch': [0.9995, 0.9999]}) | ||
sub.bind_({'test.every': 1, 'test.sdr': True, 'epochs': 4}) | ||
sub.bind_({'dset.segment': 28, 'dset.shift': 2}) | ||
sub.bind_({'batch_size': 32}) | ||
auto = {'dset': 'auto_mus'} | ||
auto.update({'augment.remix.proba': 0, 'augment.scale.proba': 0, | ||
'augment.shift_same': True}) | ||
sub.bind_(auto) | ||
sub.bind_({'batch_size': 16}) | ||
sub.bind_({'optim.lr': 1e-4}) | ||
sub.bind_({'model_segment': 44}) | ||
sub() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
models: ['9a6b4851', '1ef250f1', 'fa0cb7f9', '902315c2'] | ||
segment: 44 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
models: ['fa0cb7f9', '902315c2', 'fa0cb7f9', '902315c2'] | ||
segment: 44 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
models: ['9a6b4851', '9a6b4851', '1ef250f1', '1ef250f1'] | ||
segment: 44 |