File "<ipython-input-1-f32518f9cfc3>", line 1, in <module> model.load_from_checkpoint(ckpt_path) ^^^ 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 classmet...
Traceback (most recent call last): File "main.py", line 64, in <module> model = LitModel.load_from_checkpoint(hparams.checkpoint) File "/home/siahuat0727/.local/lib/python3.8/site-packages/pytorch_lightning/core/saving.py", line 138, in load_from_checkpoint model = cls._load_model_sta...
Expand All@@ -66,7 +65,6 @@ def load_from_checkpoint( Args: checkpoint_path: Path to checkpoint. This can also be a URL. args: Any positional args needed to init the model. map_location: If your checkpoint saved a GPU model and you now load on CPUs ...
-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/...
model=MNISTModel.load_from_checkpoint('mnist.ckpt',net='cnn',h_dim=200) /usr/local/lib/python3.6/dist-packages/pytorch_lightning/core/saving.py in load_from_checkpoint(cls, checkpoint_path, map_location, hparams_file, tags_csv, *args, **kwargs) 167 checkpoint[cls.CHECKPOINT_HYPER_PARAMS_...
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: ...
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...
The checkpoint is mapped, but this doesn't seem to affect the model created and returned later. https://github.com/Lightning-AI/lightning/blob/fd4697c62c059fc7b9946e84d91625ecb6efdbe5/src/lightning/pytorch/core/saving.py#L51-L92
However, when trying toresume_from_checkpoint, I'm getting below error. results = self._run(model, ckpt_path=self.ckpt_path) File "/root/anaconda3/envs/pytorch_faiss/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1228, in _run self._restore_modules_and_callbacks(...
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...