Add S3/R2 sync check tool and split SHA256 management out of manage_v2.py#7947
Open
atalman wants to merge 1 commit intopytorch:mainfrom
Open
Add S3/R2 sync check tool and split SHA256 management out of manage_v2.py#7947atalman wants to merge 1 commit intopytorch:mainfrom
atalman wants to merge 1 commit intopytorch:mainfrom
Conversation
|
@atalman is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
zxiiro
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
s3_management/index_tools.py— a new CLI tool for verifying and fixingPyTorch wheel integrity across S3 and Cloudflare R2.
--set-checksum,--recompute-sha256-pattern,--recompute-missing-sha256) out ofmanage_v2.pyintoindex_tools.py, so thatmanage_v2.pyis focusedsolely on index HTML generation/upload.
manage_v2.pystill reports missing SHA256 checksums during index generation.Motivation
Binaries on S3 and R2 can get out of sync (different SHA256 content hashes for
the same key), causing
pip installfailures with hash mismatch errors.Fixes pytorch/pytorch#145501
Fixes pytorch/pytorch#179821
New capabilities in
index_tools.pyS3/R2 sync verification (
--check-r2-sync):.whland.whl.metadatafiles from both S3 and R2 for a givenpackage/version, computes SHA256 from actual content, and reports mismatches
or files missing on R2.
+, matches all local-version variants (e.g.,2.9.0matches
cu129,cu124,cpu, etc.).whl/does not scanwhl/nightly/or
whl/test/).S3→R2 sync repair (
--fix-r2-sync):--check-r2-syncbut copies mismatched/missing files from S3(source of truth) to R2.
download-r2.pytorch.orgforeach fixed file (requires
CLOUDFLARE_ZONE_IDandCLOUDFLARE_API_TOKENenv vars).
Usage examples