-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingcheckpointingRelated to checkpointingRelated to checkpointinghelp wantedOpen to be worked onOpen to be worked onpriority: 1Medium priority taskMedium priority taskwaiting on authorWaiting on user action, correction, or updateWaiting on user action, correction, or update
Description
🐛 Bug
I saved a model trained with PL 1.1 from an environment with PL 1.2 and it breaks. There are some PL specific objects that get pickled into the checkpoint. This shouldn't happen. See error below:
Traceback (most recent call last):
File "scripts/train_bart_seq2seq_augmented_kilt.py", line 45, in <module>
model = BartSeq2SeqAugmented(**vars(args))
File "/home/ndecao/modify-transformers-memory/src/models/bart_seq2seq_augmented_kilt.py", line 67, in __init__
self.model = BartSeq2Seq.load_from_checkpoint(self.hparams.model_checkpoint)
File "/home/ndecao/.anaconda3/envs/kilt37/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 134, in load_from_checkpoint
checkpoint = pl_load(checkpoint_path, map_location=lambda storage, loc: storage)
File "/home/ndecao/.anaconda3/envs/kilt37/lib/python3.7/site-packages/pytorch_lightning/utilities/cloud_io.py", line 32, in load
return torch.load(f, map_location=map_location)
File "/home/ndecao/.anaconda3/envs/kilt37/lib/python3.7/site-packages/torch/serialization.py", line 594, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/home/ndecao/.anaconda3/envs/kilt37/lib/python3.7/site-packages/torch/serialization.py", line 853, in _load
result = unpickler.load()
AttributeError: Can't get attribute '_gpus_arg_default' on <module 'pytorch_lightning.utilities.argparse_utils'
Expected behavior
The model should load without any error.
Environment
The model was trained and saved using PL 1.1.6 and loaded from PL 1.2.1
- PyTorch Version (e.g., 1.0): 1.7.1
- OS (e.g., Linux): Linux
- Python version: 3.9
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcheckpointingRelated to checkpointingRelated to checkpointinghelp wantedOpen to be worked onOpen to be worked onpriority: 1Medium priority taskMedium priority taskwaiting on authorWaiting on user action, correction, or updateWaiting on user action, correction, or update