Lightning-AI / Lightning-AI/pytorch-lightning

No error crash, just a never ending pause

Open
#20,523 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug strategy: ddp ver: 2.4.x
Dominant language
Python
Stars
31.4k
Forks
3.8k
Avg merge
6d 7h
Merged PRs (30d)
6

Description

### Bug description

Notebook - https://www.kaggle.com/code/vigneshwar472/baseline-residualunetse3d
Github repo (ResidualUNetSE3D implementation) - https://github.com/wolny/pytorch-3dunet/tree/master

## Issue - Training starts on 1x P100 GPU but it does not start on 2x T4 GPU
I want to use 2 GPUs simultaneoulsy for training (ddp_notebook strategy) But I do not know, training does not start and 2 GPUs were not in use

I have no idea "why it's not working".

Check the error messages and logs section.

### What version are you seeing the problem on?

v2.4

### How to reproduce the bug

```python
Go the Kaggle Notebook https://www.kaggle.com/code/vigneshwar472/baseline-residualunetse3d-train

Copy & Edit
Run All
You will encounter a never ending pause
```

### Error messages and logs

### When used with 2x T4 GPUs
```
n = len(folds)

for i in range(n):
print(f'fold {i} started....')
model = ResidualUNetSE3D(in_channels=1, out_channels=6)
lm = CZIILightningModule(model=model)
logger = CSVLogger(save_dir='/kaggle/working/training_results', name=f'fold_{i}')
trainer = Trainer(accelerator='gpu',
strategy='ddp_notebook',
devices=2,
precision='32',
gradient_clip_val=None,
logger=logger,
max_epochs=15,
enable_checkpointing=True,
enable_progress_bar=True,
enable_model_summary=False,
inference_mode=True,
default_root_dir='/kaggle/working/training_results',
num_sanity_val_steps=0)
trainer.fit(model=lm,
train_dataloaders=DataLoader(folds[i][0], batch_size=1, num_workers=4, shuffle=True),
val_dataloaders=DataLoader(folds[i][1], batch_size=1, num_workers=4, shuffle=False))
del model, lm, logger, trainer
print(f'fold {i} completed....')
```

![Screenshot 2024-12-29 092937](https://github.com/user-attachments/assets/58b60c54-efbf-4dda-9fcb-acc26b2279ee)

### When used with 1x P100 GPU

[
![Screenshot 2024-12-29 093405](https://github.com/user-attachments/assets/a6c7487c-25ce-45ba-ac93-41662a749951)
](url)

### Environment

Please go the kaggle notebook and run it

### More info

_No response_

cc @justusschock @lantiga

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked Kaggle notebook with v2.4 and compare the 1x P100 and 2x T4 configurations. Inspect the Trainer setup using strategy='ddp_notebook' and devices=2, along with the provided logs; no local file or test is named. Done means reproducing the pause, identifying its cause, and confirming a working multi-GPU run.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
distributed-systems, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.