-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix sorting bug #1730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix sorting bug #1730
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -126,11 +126,12 @@ def ddp_init_group(run_opts): | |
| "--distributed_backend=nccl" | ||
| ) | ||
| else: | ||
| if run_opts["local_rank"] + 1 > torch.cuda.device_count(): | ||
| raise ValueError( | ||
| "Killing process " + str() + "\n" | ||
| "Not enough GPUs available!" | ||
| ) | ||
| if not run_opts["distributed_backend"] == "gloo": | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, why is gloo treated like that? :p
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CPU vs GPU - there is no GPU testing on github, or pay for it :p
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the way it is implemented for GPU is incompatible with CPU: This pytorch example for gloo is incompatible with SB, as it was before the contributed fix
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for this part, if there is only CPU, ofc there are not enough GPUs ;) |
||
| if run_opts["local_rank"] + 1 > torch.cuda.device_count(): | ||
| raise ValueError( | ||
| "Killing process " + str() + "\n" | ||
| "Not enough GPUs available!" | ||
| ) | ||
| if "RANK" in os.environ is None or os.environ["RANK"] == "": | ||
| raise ValueError( | ||
| "To use DDP backend, start your script with:\n\t" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # target of this test | ||
| sorting: ascending | ||
| avoid_if_longer_than: 6.283 | ||
|
|
||
| # below from: tests/integration/VAD/hyperparams.yaml | ||
| # Seed needs to be set at top of yaml, before objects with parameters are made | ||
| seed: 1234 | ||
| __set_seed: !apply:torch.manual_seed [!ref <seed>] | ||
| sample_rate: 16000 | ||
|
|
||
|
|
||
| # Training params | ||
| N_epochs: 1 | ||
| lr: 0.01 | ||
| dataloader_options: | ||
| batch_size: 20 | ||
|
|
||
| # Feature parameters | ||
| n_mfcc: 20 | ||
|
|
||
| # Model parameters | ||
| rnn_layers: 2 | ||
| rnn_neurons: 256 | ||
| emb_size: 23 | ||
| dropout: 0.1 | ||
| output_neurons: 1 | ||
|
|
||
| compute_features: !new:speechbrain.lobes.features.MFCC | ||
| n_mfcc: !ref <n_mfcc> | ||
|
|
||
| mean_var_norm: !new:speechbrain.processing.features.InputNormalization | ||
| norm_type: global | ||
|
|
||
| rnn: !new:speechbrain.nnet.RNN.LSTM | ||
| input_size: !ref <n_mfcc> * 33 # d & dd = *3, 5 left & 5 right = *11 | ||
| hidden_size: !ref <rnn_neurons> | ||
| num_layers: !ref <rnn_layers> | ||
| dropout: !ref <dropout> | ||
| bidirectional: False | ||
| re_init: True | ||
|
|
||
| lin: !new:speechbrain.nnet.linear.Linear | ||
| input_size: !ref <rnn_neurons> | ||
| n_neurons: !ref <output_neurons> | ||
| bias: False | ||
|
|
||
| modules: | ||
| compute_features: !ref <compute_features> | ||
| rnn: !ref <rnn> | ||
| lin: !ref <lin> | ||
| mean_var_norm: !ref <mean_var_norm> | ||
|
|
||
| opt_class: !name:torch.optim.Adam | ||
| lr: !ref <lr> | ||
|
|
||
| compute_loss: !name:speechbrain.nnet.losses.bce_loss |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # target of this test | ||
| sorting: descending | ||
| avoid_if_longer_than: 6.283 | ||
|
|
||
| # below from: tests/integration/VAD/hyperparams.yaml | ||
| # Seed needs to be set at top of yaml, before objects with parameters are made | ||
| seed: 1234 | ||
| __set_seed: !apply:torch.manual_seed [!ref <seed>] | ||
| sample_rate: 16000 | ||
|
|
||
|
|
||
| # Training params | ||
| N_epochs: 1 | ||
| lr: 0.01 | ||
| dataloader_options: | ||
| batch_size: 20 | ||
|
|
||
| # Feature parameters | ||
| n_mfcc: 20 | ||
|
|
||
| # Model parameters | ||
| rnn_layers: 2 | ||
| rnn_neurons: 256 | ||
| emb_size: 23 | ||
| dropout: 0.1 | ||
| output_neurons: 1 | ||
|
|
||
| compute_features: !new:speechbrain.lobes.features.MFCC | ||
| n_mfcc: !ref <n_mfcc> | ||
|
|
||
| mean_var_norm: !new:speechbrain.processing.features.InputNormalization | ||
| norm_type: global | ||
|
|
||
| rnn: !new:speechbrain.nnet.RNN.LSTM | ||
| input_size: !ref <n_mfcc> * 33 # d & dd = *3, 5 left & 5 right = *11 | ||
| hidden_size: !ref <rnn_neurons> | ||
| num_layers: !ref <rnn_layers> | ||
| dropout: !ref <dropout> | ||
| bidirectional: False | ||
| re_init: True | ||
|
|
||
| lin: !new:speechbrain.nnet.linear.Linear | ||
| input_size: !ref <rnn_neurons> | ||
| n_neurons: !ref <output_neurons> | ||
| bias: False | ||
|
|
||
| modules: | ||
| compute_features: !ref <compute_features> | ||
| rnn: !ref <rnn> | ||
| lin: !ref <lin> | ||
| mean_var_norm: !ref <mean_var_norm> | ||
|
|
||
| opt_class: !name:torch.optim.Adam | ||
| lr: !ref <lr> | ||
|
|
||
| compute_loss: !name:speechbrain.nnet.losses.bce_loss |
Uh oh!
There was an error while loading. Please reload this page.