Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #1249 pytorch-lightning patches #1254

Merged
merged 1 commit into from
May 10, 2024

Conversation

a-gardner1
Copy link
Contributor

Related Issue \ discussion

See #1249.

Patch Description

This patch adds more precise error handling and recovery for attribute errors encountered when accessing module or class attributes whose existence depends upon the version of pytorch-lightning installed.

The patch also deduplicates some code between PatchPyTorchModelIO._patch_lightning_io and PatchPyTorchModelIO._patch_pytorch_lightning_io.

Testing Instructions

Without the patch applied, train a model with pytorch-lightning-2.0.0 or greater and save a checkpoint, which should automatically be uploaded to the ClearML server if the task is configured to do so.
Trying to resume training from the checkpoint will not work as the patch for loading models cannot be applied.
With the patch applied, training should resume as expected.

Other Information

@jkhenning jkhenning merged commit 66a7f56 into allegroai:master May 10, 2024
@a-gardner1 a-gardner1 deleted the wip-1249-fix-lightning-patch branch May 10, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants