When changin shimmer versions, changes made in the lib may break your old checkpoints. To avoid this, we provide migration functions that can update checkpoints so that they can be used with newer versions.
The repo for code migration is in: https://github.com/bdvllrs/migrate-ckpt
If you install shimmer with pip:
shimmer migrate-ckpt path/to/checkpoint1.ckpt checkpoint2.ckpt ...
from shimmer import migrate_model
migrate_model()
You can use the provided lightning callback that will add the existing migration in the checkpoint when saving the checkpoint.
from lightning.pytorch import Trainer
from shimmer import SaveMigrations
callback = SaveMigrations()
trainer = Trainer(..., callbacks=[callback])
...