Comments (4)
BYW, this code works well without DDP. It seems that there is only one process can load the embedding_model from disk successfully.
from speechbrain.
Hi, this is most likely due to an error in the .py script, can we see the "utils/train_speaker_embeddings_v2_finetune.py"?
from speechbrain.
Sorry for the late reply.
There's some code cannot be shown in the .py. But I can show you the main function of it.
# This flag enables the inbuilt cudnn auto-tuner
torch.backends.cudnn.benchmark = True
# CLI:
hparams_file, run_opts, overrides = sb.parse_arguments(sys.argv[1:])
# Initialize ddp (useful only for multi-GPU DDP training)
sb.utils.distributed.ddp_init_group(run_opts)
# Load hyperparameters file with command-line overrides
with open(hparams_file) as fin:
hparams = load_hyperpyyaml(fin, overrides)
sb.core.create_experiment_directory(
experiment_directory=hparams["output_folder"],
hyperparams_to_save=hparams_file,
overrides=overrides,
)
# Initialization of the pre-trainer
run_on_main(hparams["pretrainer"].collect_files)
hparams["pretrainer"].load_collected(device=run_opts["device"])
# run_on_main(hparams["pretrainer"].load_collected(device=run_opts["device"]))
#print(hparams["pretrainer"].loadables["embedding_model"] is hparams['embedding_model'] )
# Brain class initialization
speaker_brain = SpeakerBrain(
modules=hparams["modules"],
opt_class=hparams["opt_class"],
hparams=hparams,
run_opts=run_opts,
checkpointer=hparams["checkpointer"],
)
#speaker_brain.optimizer.add_param_group({'params':speaker_brain.modules.embedding_model.parameters(),'lr':1e-4})
#speaker_brain.modules.embedding_model = hparams["pretrainer"].loadables["embedding_model"]
#print(speaker_brain.modules.embedding_model.state_dict())
# Training
speaker_brain.fit(
speaker_brain.hparams.epoch_counter,
train_data,
valid_data,
train_loader_kwargs=hparams["dataloader_options"],
valid_loader_kwargs=hparams["dataloader_options"],
)
from speechbrain.
Hello,
I see that you are using an old version of SpeechBrain. Maybe trying to switch from your old version to SpeechBrain 1.0 (-> git clone speechbrain/speechbrain.git) may solve your issue? In any case, if you requires more in-depth assistance you'll need to provide some scripts to reproduce your issue...
from speechbrain.
Related Issues (20)
- VAD Example Code Broken: Need hparams['sample_rate'] HOT 1
- No module named 'speechbrain.inference' HOT 2
- DAC cannot be imported
- RuntimeError when processing VAD on short audio HOT 7
- [Feature Request]: Stree info in G2P output HOT 1
- [Feature Request]: Improve DAC interface
- unused parameters when using WavLM. cased crash when using DDP HOT 9
- [Feature Request]: Load a speechbrain-fine-tuned huggingface model checkpoint with the huggingface interface HOT 1
- Incorrect transformer mask size HOT 8
- loading fully trained brain (a brain who finished training) and then evaluating it with brain.evaluate. will cause a crash when using hpopt context but not reporting in test stage
- Hi! LibriSpeech char training!! HOT 1
- Wav2Vec2Pretrain (HFTransformersInterface implementation) samples padded values for mask_time_indices and negative_sample_indices HOT 2
- spkrec-ecapa-voxceleb-mel-spec model modifies mel spectrum in place when used with CPU HOT 2
- A few unoptimised piece of code (augmentation and masking) HOT 2
- Language codes not following ISO standards in lang-id-voxlingua107-ecapa HOT 1
- Train loop may crash during checkpointing HOT 5
- Possible NCCL-level deadlock during checkpointing HOT 7
- Error during encoding
- AMP at inference time HOT 3
- Unable to use model trained from enhancement template HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speechbrain.