Skip to content

Releasing an Ecosystem library

Molly Xu edited this page Apr 27, 2026 · 4 revisions

Onboarding to test-infra release scripts

Before using this wiki, ensure your library is onboarded to the test-infra release scripts: https://github.com/pytorch/test-infra/wiki/Releasing-to-download.pytorch.org-and-pypi

Starting an RC

Before each release, torch releases an RC.

If your library is not ABI Stable, you will need to release a compatible RC wheel.

Create Release PR:

  • Create release branch
    • git checkout -b release/0.11
  • Edit Github workflow wheels to test across all versions of relevant libraries (ex. Python, CUDA).
  • Add the ciflow/binaries/all label to the PR.
    • This tag enables the CI to build all the requested python versions. See this workflow for details.
    • If needed, push an empty commit to restart the CI now that the tag is present.

Review Release PR

  • Check that all wheels are built successfully and passing tests.
    • Verify that each wheel is using the correct torch version for building and testing.

Add RC tag to Release PR

  • Tag release PR with RC tag (ex. v0.11.0-rc1)
    • git checkout release/0.11 && git pull origin release/0.11
    • git tag v0.11.0-rc1 # yes, it starts with a “v”
    • git push --tags
  • After pushing the tag:
    • The wheels built by the PR will be uploaded to the test S3 buckets!
      • pytorch/whl/test/cpu or pytorch/whl/test/cu130.
    • The wheels will become accessible at https://download.pytorch.org/whl/test/
    • Note: If you cherry-pick PRs onto the release branch, you will need to add a new RC tag to update the uploaded wheels.

Test the generated RC wheels

Update test-infra release version

  • Create a PR in test-infra that updates the version corresponding to your library in release_versions.sh
  • Merge PR before starting dry-runs

Dry-run download.pytorch.org Upload

Dry-run PyPI Upload

  • Run release-stage-pypi workflow with dry-run enabled, then inspect the logs.
    • These are the wheels that will be downloaded by default via pip install torchcodec.
    • Verify that each discovered wheel is correct, and not duplicated.
      • If there are missing or duplicate wheels, reach out to the test-infra team for support.
    • Ensure the Linux wheel selected matches the default PyTorch version from the PyTorch Get Started page.
      • This is the version that is installable without --index-url.

Release runbook

download.pytorch.org Upload

  • Run release-download-pytorch-org workflow with dry-run disabled and inspect the logs.
    • The wheels are now in the s3 buckets!
      • pytorch/whl/cpu or pytorch/whl/cu130
    • Manually start the update-s3 workflow (or wait for the hourly update)
      • Validate the new package is visible via download.pytorch.org by navigating to package url and inspecting for example: https://download.pytorch.org/whl/cu130/torchcodec/
      • Test that new package is installable
        • pip install torchcodec --extra-index-url https://download.pytorch.org/whl/cu130 --dry-run --ignore-installed

PyPI Upload

  • Run release-stage-pypi workflow with dry-run disabled, then inspect the logs.

    • The results should be the same as the dry-run.
  • Run release-pypi workflow with dry-run enabled, then inspect the logs.

    • Check “Display structure of downloaded files” step and verify these are the files you intend to upload to PyPI.
  • Run again with dry-run disabled, then inspect the logs

    • Make sure “Publish Package to pypi” step completes successfully
    • Confirm that the release is available on PyPI project page.
    • Confirm that installing using pip via PyPI works.

Tag and release notes

  • Push the release tag, from the tip of the release branch:
    • git checkout release/0.0.2 && git pull origin release/0.0.2
    • git tag v0.0.2 # yes, it starts with a “v”
    • git push --tags
  • Publish release notes, pin them to the release tag.

Update the main branch

  • Now that 0.11.0 is released, create one more PR on main, like this one:
    • Update the main branch’s version.txt to be 0.12.0a0
    • Update the version compatibility table in the README

Clone this wiki locally