Skip to content

Conversation

@liangel-02
Copy link
Contributor

@liangel-02 liangel-02 commented Nov 5, 2025

Summary

We keep track of what has been processed by deleting processed keys from the original state dict. This is for the case when not all tensor attributes are available to us when loading, so we reconstruct the tensor subclasses with missing attributes in a later call.

We expect the state dict to be empty after loading is complete

Test
python test/prototype/safetensors/test_safetensors_support.py

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 5, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3297

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit cdc5ca2 with merge base 6c78c4d (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 5, 2025
@liangel-02 liangel-02 added the topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) label Nov 5, 2025
@liangel-02 liangel-02 force-pushed the update_metadata_structure branch 5 times, most recently from 1788f28 to 0e290bb Compare November 5, 2025 23:47
@liangel-02 liangel-02 force-pushed the update_metadata_structure branch from 0e290bb to cdc5ca2 Compare November 5, 2025 23:55
@liangel-02 liangel-02 requested a review from jerryzh168 November 6, 2025 16:22
@liangel-02 liangel-02 marked this pull request as ready for review November 6, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants