pytorch/scripts/release
Catherine Lee 3eb3f4ed55 Upload METADATA file with whl binaries (#143677)
Upload the metadata file for wheels for pep658 https://peps.python.org/pep-0658/
Using a python script but using bash might be easier...

--

Testing

Example run https://github.com/pytorch/pytorch/actions/runs/12550595201/job/34994883276 without actual upload, just dry run

Lightly tested the script to make sure it uploads to s3, but integration with the bash script + workflow is untested

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143677
Approved by: https://github.com/seemethere
2025-01-03 00:32:05 +00:00
..
anaconda-prune
promote
apply-release-changes.sh [Release] Apply Release changes scripts after release 2.4 (#135495) 2024-09-09 16:49:04 +00:00
cut-release-branch.sh
README.md
restore-backup.sh
tag-docker-images.sh Fix script name in the comments (#135507) 2024-09-13 19:59:47 +00:00
upload_metadata_file.py Upload METADATA file with whl binaries (#143677) 2025-01-03 00:32:05 +00:00

PyTorch Release Scripts

These are a collection of scripts that are to be used for release activities.

NOTE: All scripts should do no actual work unless the DRY_RUN environment variable is set to disabled. The basic idea being that there should be no potential to do anything dangerous unless DRY_RUN is explicitly set to disabled.

Requirements to actually run these scripts

  • AWS access to pytorch account
  • Access to upload conda packages to the pytorch conda channel
  • Access to the PyPI repositories

Promote

These are scripts related to promotion of release candidates to GA channels, these can actually be used to promote pytorch, libtorch, and related domain libraries.

Usage

Usage should be fairly straightforward and should actually require no extra variables if you are running from the correct git tags. (i.e. the GA tag to promote is currently checked out)

PACKAGE_TYPE and PACKAGE_NAME can be swapped out to promote other packages.

Promoting pytorch wheels

promote/s3_to_s3.sh

Promoting libtorch archives

PACKAGE_TYPE=libtorch PACKAGE_NAME=libtorch promote/s3_to_s3.sh

Promoting conda packages

promote/conda_to_conda.sh

Promoting wheels to PyPI

WARNING: These can only be run once and cannot be undone, run with caution

promote/wheel_to_pypi.sh

Restoring backups

All release candidates are currently backed up to s3://pytorch-backup/${TAG_NAME} and can be restored to the test channels with the restore-backup.sh script.

Which backup to restore from is dictated by the RESTORE_FROM environment variable.

Usage

RESTORE_FROM=v1.5.0-rc5 ./restore-backup.sh