Even with model_test = CoolSystem(hyperparams_test).load_from_checkpoint('checkpoints/try_ckpt_epoch_1.ckpt'), PyTorch Lightning is still complaining that 'dict' object has no attribute 'data_dir' Am I doing something wrong here? williamFalcon commented on Mar 7, 2020 williamFalcon on Mar...
(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) ...
File "/home/lasupreme/miniconda3/envs/torchenv/lib/python3.11/site-packages/lightning/pytorch/utilities/model_helpers.py", line 93, in __get__ raise TypeError( TypeError: The classmethod `LightningCloudSegNet.load_from_checkpoint` cannot be called on an instance. Please call it on the class ...
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-contributorswilliamFalcon added feature ...
-Trainer now calls`on_load_checkpoint()`when resuming from a checkpoint ([1666](https://github.com/PyTorchLightning/pytorch-lightning/pull/1666)) ##[0.7.5]- 2020-04-27 Expand Down 4 changes: 4 additions & 0 deletions4pytorch_lightning/trainer/training_io.py ...
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, ...
How to modify the code to load the checkpoint and also resume from it ? Environment PyTorch Lightning Version 1.6.5 Torch 1.13.0 Python version 3.8 CUDA Version: 11.4 4 NVIDIA A100-SXM4-40GBs Deepspeed 0.9.1 More info No response
pip3 install --upgrade git+https://github.com/PyTorchLightning/pytorch-lightning.git ContributorAuthor sshleifer Jun 8, 2020 • edited Tried that, get better traceback but no solution: KeyError: 'Trying to restore training state but checkpoint contains only the model. This is probably due to...
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: ...
Also, I see at some places the model is loaded directly using load_state_dict without using the load_from_checkpoint function in pl. I mean on_load_checkpoint will not be called there. For eg. here: https://github.com/PyTorchLightning/pytorch-lightning/blob/ed8a01afb0f9a605933563712e447a6...