question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 Screenshot 2022-03-25 at 16 45 29

I thing there is an issue with named_params somewhere

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
krshrimalicommented, May 24, 2022

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! ❤️

2reactions
ar90ncommented, May 16, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found