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

Feature/handle pytorch load changes #306

Merged

Conversation

IsaevIlya
Copy link
Contributor

Description

In PyTorch 2.6, torch.load() now requires explicit weights_only parameter. When defaulting to True,
it restricts supported data types during loading (see serialization docs).
Set weights_only=False in S3LightningCheckpoint to match PyTorch Lightning's CheckpointIO implementation, maintain backwards compatibility.

  • I have updated the CHANGELOG or README if appropriate

By submitting this pull request, I confirm that my contribution is made under the terms of BSD 3-Clause License and I agree to the terms of the LICENSE.

@IsaevIlya IsaevIlya requested a review from a team as a code owner February 4, 2025 15:44
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:51 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:51 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:51 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:51 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:51 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:51 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:51 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:51 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:52 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:52 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:52 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 15:52 — with GitHub Actions Inactive
text,
)

scalars = (
none()
| booleans()
booleans()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on what we care about for 'python primitives' this is not a complete list :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, that it is primitives that now supported by torch.load

@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 16:46 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 16:46 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya temporarily deployed to integration-tests February 4, 2025 16:46 — with GitHub Actions Inactive
@IsaevIlya IsaevIlya merged commit 7413e1b into awslabs:main Feb 4, 2025
34 checks passed
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