https://github.com/Lightning-AI/lightning/blob/fd4697c62c059fc7b9946e84d91625ecb6efdbe5/src/lightning/pytorch/core/saving.py#L51-L92 I think this works to fix it import torch ... def _load_from_checkpoint( ... if issubclass(cls, pl.LightningModule): storage = _load_state(cls, chec...
50 changes: 26 additions & 24 deletions50pytorch_lightning/core/saving.py Original file line numberDiff line numberDiff line change Expand Up@@ -52,7 +52,6 @@ class ModelIO(object): defload_from_checkpoint( cls, checkpoint_path:str, ...
Labels bughelp wantedpriority: 0 Comments Contributor sshleifer Jun 8, 2020 • edited sshleiferadded thehelp wantedlabelJun 8, 2020 try use the last dev version 0.8 pip3 install --upgrade git+https://github.com/PyTorchLightning/pytorch-lightning.git ...
Bug description I've been using pytorch_lightning for quite a while. Recently, I've started using newly proposed imports such as: import lightning as L pytorch-lightning==2.0.9.post0 torch==2.1.0 What version are you seeing the problem on? #v2.0, master How to reproduce the bug importl...
(checkpoint, *args, **kwargs) File "/home/siahuat0727/.local/lib/python3.8/site-packages/pytorch_lightning/core/saving.py", line 174, in _load_model_state model = cls(*cls_args, **cls_kwargs) File "main.py", line 46, in __init__ super().__init__(*args, **kwargs) ...
pytorch-lightning: 1.0.0 tqdm: 4.41.1 System: OS: Linux architecture: 64bit processor: x86_64 python: 3.6.9 version:Proposal for help#1SMP Thu Jul 23 08:00:38 PDT 2020 Additional context Part of the problem seems to stem fromcheckpoint_connector.py: ...
PyTorch Lightning Version: 1.5.4 PyTorch Version: 1.8.1 Python version : 3.8 OS: ubuntu 18.04 CUDA/cuDNN version: cuda11.1 cudnn8 GPU models and configuration: 1 * v100 gpu/node How you installed PyTorch: pip Additional context cc@awaelchli@ananthsub@ninginthecloud@rohitgr7@SeanNaren@akihir...
-Fixed issue where`Model.load_from_checkpoint("checkpoint.ckpt", map_location=map_location)`would always return model on CPU ([#17308](https://github.com/Lightning-AI/lightning/pull/17308)) ##[2.0.1]- 2023-03-30 Expand Down 13 changes: 9 additions & 4 deletions13src/lightning/pytorch/...
Option 2: Have a separate method Trainer.load_from_checkpoint_at_url('http://') Resources We can use this under the hood: (https://pytorch.org/docs/stable/hub.html#torch.hub.load_state_dict_from_url) Any thoughts on which one is better? @PyTorchLightning/core-contributorswilliam...
pytorch_lightning.core.saving.ModelIO.load_from_checkpoint()hasargsin the arguments to initializepl.LightningModule. If the module has multiple arguments, the method doesn't work correctly. Snippets not to add arguments forpl.LightningModule