KEMBAR78
Expose option to disable CRC-32 computation during `torch.save` by mikaylagawarecki · Pull Request #137735 · pytorch/pytorch · GitHub
Skip to content

Conversation

@mikaylagawarecki
Copy link
Contributor

@mikaylagawarecki mikaylagawarecki commented Oct 10, 2024

Option only works in open source, not internal

Stack from ghstack (oldest at bottom):

Differential Revision: D64545647

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 10, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 8315e24 with merge base 53e356a (image):
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added the release notes: jit release notes category label Oct 10, 2024
mikaylagawarecki added a commit that referenced this pull request Oct 10, 2024
ghstack-source-id: 8f55cec
Pull Request resolved: #137735
@mikaylagawarecki mikaylagawarecki changed the title Expose option to disable CRC-32 computation Expose option to disable CRC-32 computation during torch.save Oct 10, 2024
mikaylagawarecki added a commit that referenced this pull request Oct 10, 2024
ghstack-source-id: c98df38
Pull Request resolved: #137735
mikaylagawarecki added a commit that referenced this pull request Oct 10, 2024
ghstack-source-id: 6a551f4
Pull Request resolved: #137735
@mikaylagawarecki mikaylagawarecki added release notes: python_frontend python frontend release notes category and removed release notes: jit release notes category labels Oct 11, 2024
mikaylagawarecki added a commit that referenced this pull request Oct 11, 2024
ghstack-source-id: b3bc417
Pull Request resolved: #137735
@mikaylagawarecki mikaylagawarecki added topic: new features topic category topic: improvements topic category and removed topic: new features topic category labels Oct 11, 2024
mikaylagawarecki added a commit that referenced this pull request Oct 11, 2024
ghstack-source-id: 9184234
Pull Request resolved: #137735
mikaylagawarecki added a commit that referenced this pull request Oct 11, 2024
ghstack-source-id: ef4eb95
Pull Request resolved: #137735
mikaylagawarecki added a commit that referenced this pull request Oct 11, 2024
ghstack-source-id: 88e39a9
Pull Request resolved: #137735
@mikaylagawarecki mikaylagawarecki marked this pull request as ready for review October 11, 2024 18:01
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Only small nits, sounds pretty good in general!

return _compute_crc32


def set_default_crc32_options(compute_crc32: bool):
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: why set_default_crc32_options vs set_crc32_options ? There is no way to override this flag from the end user of torch.save point of view.

Copy link
Contributor Author

@mikaylagawarecki mikaylagawarecki Oct 11, 2024

Choose a reason for hiding this comment

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

will use set_crc32_options, the default was for consistency with the naming of other similar serialization APIs

MZ_ZIP_FLAG_WRITE_ALLOW_READING = 0x8000,
MZ_ZIP_FLAG_ASCII_FILENAME = 0x10000
MZ_ZIP_FLAG_ASCII_FILENAME = 0x10000,
MZ_ZIP_FLAG_DO_NOT_COMPUTE_CRC32 = 0x20000, /* don't compute the crc32 of file data that's being added. */
Copy link
Collaborator

Choose a reason for hiding this comment

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

I forgot what's the story with these changes and if they will work internally?

Copy link
Contributor Author

@mikaylagawarecki mikaylagawarecki Oct 11, 2024

Choose a reason for hiding this comment

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

won't work internally as internal has different build options for miniz

mikaylagawarecki added a commit that referenced this pull request Oct 11, 2024
ghstack-source-id: 661896d
Pull Request resolved: #137735
…save`"

Option only works in open source, not internal




[ghstack-poisoned]
mikaylagawarecki added a commit that referenced this pull request Oct 11, 2024
ghstack-source-id: fe3cc74
Pull Request resolved: #137735
@mikaylagawarecki
Copy link
Contributor Author

@mikaylagawarecki has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

…save`"

Option only works in open source, not internal


Differential Revision: [D64545647](https://our.internmc.facebook.com/intern/diff/D64545647)

[ghstack-poisoned]
mikaylagawarecki added a commit that referenced this pull request Oct 17, 2024
ghstack-source-id: 40deb82
Pull Request resolved: #137735
@mikaylagawarecki
Copy link
Contributor Author

@mikaylagawarecki has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

…save`"

Option only works in open source, not internal


Differential Revision: [D64545647](https://our.internmc.facebook.com/intern/diff/D64545647)

[ghstack-poisoned]
mikaylagawarecki added a commit that referenced this pull request Oct 24, 2024
Pull Request resolved: #137735

Option only works in open source, not internal




@imported-using-ghimport

Differential Revision: [D64545647](https://our.internmc.facebook.com/intern/diff/D64545647/)
ghstack-source-id: 249920368
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64545647

…save`"

Option only works in open source, not internal


Differential Revision: [D64545647](https://our.internmc.facebook.com/intern/diff/D64545647)

[ghstack-poisoned]
mikaylagawarecki added a commit that referenced this pull request Oct 24, 2024
Pull Request resolved: #137735

Option only works in open source, not internal




@imported-using-ghimport

Differential Revision: [D64545647](https://our.internmc.facebook.com/intern/diff/D64545647/)
ghstack-source-id: 249959423
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64545647

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR has internal changes and must be landed via Phabricator! Please try reimporting/rexporting the PR!

Details for Dev Infra team Raised by workflow job

@wdvr
Copy link
Contributor

wdvr commented Oct 25, 2024

@pytorchmergebot merge -f "already landed internally"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR has internal changes and must be landed via Phabricator! Please try reimporting/rexporting the PR!

Details for Dev Infra team Raised by workflow job

@mikaylagawarecki
Copy link
Contributor Author

@pytorchmergebot merge -f "already landed internally"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR has internal changes and must be landed via Phabricator! Please try reimporting/rexporting the PR!

Details for Dev Infra team Raised by workflow job

@wdvr
Copy link
Contributor

wdvr commented Oct 25, 2024

as discussed with @mikaylagawarecki and @izaitsevfb - this has been reimported as a different PR to circumvent internal export check failures. I will close this one unmerged if that one is merged in.

pytorchmergebot pushed a commit that referenced this pull request Oct 27, 2024
This is  a cherry-pick from #137735 by @mikaylagawarecki , that cannot be merged due to a (wrongly) failing check for codev

@diff-train-skip-merge

Pull Request resolved: #138959
Approved by: https://github.com/mikaylagawarecki
@wdvr wdvr closed this Oct 28, 2024
@github-actions github-actions bot deleted the gh/mikaylagawarecki/272/head branch November 28, 2024 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: python_frontend python frontend release notes category Reverted topic: improvements topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants