Flash DeepSpeedPlugin error
See original GitHub issue🐛 Bug
Hi, I’m completely new Flash, I’m having this error when trying to use DeepSpeedPlugin plugin on the Flash trainer. The code is
To Reproduce
import torch
import flash
from flash.audio import SpeechRecognition, SpeechRecognitionData
from flash.core.data.utils import download_data
# 1. Create the DataModule
download_data("https://pl-flash-data.s3.amazonaws.com/timit_data.zip", "./data")
datamodule = SpeechRecognitionData.from_json(
"file",
"text",
train_file="data/timit/train.json",
test_file="data/timit/test.json",
batch_size=4,
)
# 2. Build the task
model = SpeechRecognition(backbone="facebook/wav2vec2-base-960h")
# 3. Create the trainer and finetune the model
trainer = flash.Trainer(max_epochs=1, gpus=torch.cuda.device_count(),plugins='deepspeed')
trainer.finetune(model, datamodule=datamodule, strategy="no_freeze")
# 4. Predict on audio files!
datamodule = SpeechRecognitionData.from_files(predict_files=["data/timit/example.wav"], batch_size=4)
predictions = trainer.predict(model, datamodule=datamodule)
print(predictions)
# 5. Save the model!
trainer.save_checkpoint("speech_recognition_model.pt")
I’m getting this

I thing there is an issue with named_params somewhere
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
DeepSpeed Fix "Error building extension" - YouTube
Looking to use Adam with DeepSpeed, or another extension ? This video shows you how to install DeepSpeed with optional extensions.
Read more >accelerators — PyTorch Lightning 1.8.6 documentation
Precision plugin for DeepSpeed integration. DoublePrecisionPlugin. Plugin for training with double ( torch.float64 ) precision.
Read more >Introducing Ray Lightning: Multi-node PyTorch Lightning ...
Ray Lightning is a simple plugin for PyTorch Lightning to scale out your training. Here are the main benefits of Ray Lightning: Simple...
Read more >PyTorch Lightning vs Ignite: What Are the Differences?
The only problem I had with Pytorch is that it lacked structure when the ... trainer = Trainer(gpus=4, plugins='deepspeed', precision=16).
Read more >PyTorch Lightning 1.5 Released - Exxact Corporation
DeepSpeed is a deep learning training optimization library, ... Updated error message for interactive incompatible plugins (#9896) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi, @ar90n - I just wanted to thank you for your continuous efforts on this issue! Apologies for not being able to respond on time.
Just to acknowledge that we are aware of this, I’ll get back to you in a day or two. 😃 I appreciate the patience 🚀 and your efforts! ❤️
Hi, after I looked into this issue, I found the cause of it. It doesn’t depend on lightning-flash. It occurs with only pytorch-lightning. And there is some issue like this in pytorch-ligntning Github project page. Therefore I added some comments on them and create a new issue about integration with pytorch-lightning and DeepSpeed. They are the followings.
I think that if the above issue is solved, this issue will be solved automatically. I continue to try to solve them.