-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds triageWaiting to be triaged by maintainersWaiting to be triaged by maintainersver: 2.5.x
Description
Bug description
On calling load_from_checkpoint
i get 'None'.
I tried debugging the issue and saw that the lightning module class is initialized successfully in _load_from_checkpoint
(line 91 in saving.py
), but at the end return model.to(device)
returns None
(line 99 in saving.py
).
AFAIK this is the expected behavior of pytorch's to
, which is why i believe this is a bug.
And just FYI, loading the model works fine when i initialize the lightning module class and call pytorch's load_state_dict
.
I'm using pytorch-lightning 2.5.0.post0 with python 3.12 and pytorch 2.5.1.
What version are you seeing the problem on?
master
How to reproduce the bug
Error messages and logs
None
Environment
Current environment
* CUDA:
- GPU:
- Tesla T4
- available: True
- version: 12.4
* Lightning:
- lightning-utilities: 0.11.9
- pytorch-lightning: 2.5.0.post0
- torch: 2.5.1
- torchmetrics: 1.6.1
- torchvision: 0.20.1
* System:
- OS: Linux
- architecture:
- 64bit
- ELF
- processor: x86_64
- python: 3.12.3
More info
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds triageWaiting to be triaged by maintainersWaiting to be triaged by maintainersver: 2.5.x