torchrec/.claude/skills/release-cut/SKILL.md
# TorchRec Release Cut Instructions ## Step 1 — Switch to a Local Machine These instructions should be run from a **local machine** (e.g., MacBook Pro), not from a devgpu or dev-server, since you'll need direct access to GitHub for pushing branches and triggering workflows. ## Step 2 — Clone / Navigate to the Repo Navigate to the TorchRec repo at `~/local/torchrec`. If the directory doesn't exist, clone it first: ```bash git clone https://github.com/meta-pytorch/torchrec/ ~/local/torchrec c
npx skillsauth add meta-pytorch/torchrec torchrec/.claude/skills/release-cutInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
These instructions should be run from a local machine (e.g., MacBook Pro), not from a devgpu or dev-server, since you'll need direct access to GitHub for pushing branches and triggering workflows.
Navigate to the TorchRec repo at ~/local/torchrec. If the directory doesn't exist, clone it first:
git clone https://github.com/meta-pytorch/torchrec/ ~/local/torchrec
cd ~/local/torchrec
Fetch the latest info from GitHub and check existing branches:
git fetch --all
git branch -a
This ensures you see the most up-to-date remote branches before determining the next version.
Confirm with the user/admin:
v1.4.0, the next release would be v1.5.0.Find the last commit on or before the release cut date:
git log --oneline --before="<cut_date_plus_1_day>" -10
Identify the correct commit (no later than the cut date unless the user updates it).
Also provide the user a link to visually confirm commits in the browser:
https://github.com/meta-pytorch/torchrec/commits/main/?since=<cut_date_minus_1_week>&until=<cut_date_plus_1_week>
Example for v1.5.0 (cut date 01/25/2026):
git log --oneline --before="2026-01-26" -10b80a7ab9 (#3689)After confirming with the user, create a local release branch from the identified commit and switch to it:
git checkout -b release/<version> <commit_hash>
Example: git checkout -b release/v1.5.0 b80a7ab9
Push the release branch to the remote:
git push origin release/<version>
Example: git push origin release/v1.5.0
On a devgpu/dev-server, switch to the main branch and bump version.txt to the next pre-release version. This change should be submitted as a diff (not a GitHub PR).
git checkout main
git pull origin main
# Edit version.txt: e.g., 1.5.0a0 → 1.6.0a0
Create and submit a diff:
git add version.txt
jf submit -m "Bump version to <next_version>a0"
Example for v1.5.0 release: Update version.txt from 1.5.0a0 to 1.6.0a0.
Update version.txt from the pre-release version to the release version:
# Before (pre-release):
1.5.0a0
# After (release):
1.5.0
Commit the change with the message update the release version to V<version>, then confirm with the user to push the commit.
Note: Claude cannot push directly to GitHub. The user must manually push the commit:
git push origin release/<version>
The user needs to manually trigger the GitHub workflows at:
https://github.com/meta-pytorch/torchrec/actions
Specifically:
fbgemm-gpu version matches torchrec, and only the test channel has the latest version since the release hasn't been promoted yet.Important: When triggering unittests, remind the user to select the release channel so that dependent libraries (FBGEMM, PyTorch, etc.) use their release versions rather than nightly/pre-release builds. If the release channel doesn't work (commonly due to FBGEMM not being available yet), the test channel can be used as a fallback. Validate binaries should always use the test channel.
Beyond checking that the workflows succeed, the user should also inspect the raw logs to verify the correct dependency versions were installed. Search the logs for fbgemm-gpu and torch install lines.
What to look for:
Release channel URL — The --index-url should be a release channel, e.g.:
https://download.pytorch.org/whl/cpu (CPU)https://download.pytorch.org/whl/cu129 (CUDA)test or nightly suffix (e.g., whl/test/cpu or whl/nightly/cpu means the wrong channel was used).Dependency versions — The installed versions of torch and fbgemm-gpu should match this release. Example log lines for v1.5.0:
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/cpu
Successfully installed fbgemm-gpu-1.5.0+cpu numpy-2.3.5
pip install torch --index-url https://download.pytorch.org/whl/cpu
Successfully installed torch-2.10.0+cpu
Create a release candidate tag following the naming pattern v<version>-rc<N> (e.g., v1.5.0-rc1 for the first candidate):
git tag v<version>-rc1
If this is a subsequent release candidate (e.g., after fixes), increment the rc number (-rc2, -rc3, etc.).
Check existing tags to determine the next rc number:
git tag | grep v<version>
Note: Claude cannot push directly to GitHub. The user must manually push the tag:
git push origin v<version>-rc1
Example: git tag v1.5.0-rc1 && git push origin v1.5.0-rc1
Generate release notes and review them interactively with the user.
Gather all commits between the previous release and the current one:
git log --oneline origin/release/<previous_version>..release/<version>
Also gather author information to identify feature owners:
git log --oneline --format="%h %s | %an" origin/release/<previous_version>..release/<version>
Organize the commits into the following structure:
## Announcement
<!-- Optional: upcoming changes, deprecations, migration notices -->
## New Features
### <Feature Name>
<Short paragraph describing the feature, its motivation, and impact.>
* <Item description> [#PR1, #PR2]
* <Item description> [#PR3]
### <Another Feature>
...
## Change Log
* <Item> [#PR]
* <Item> [#PR1, #PR2]
* [full change log](https://github.com/meta-pytorch/torchrec/compare/release/<previous_version>...release/<version>)
### compatibility
* fbgemm-gpu==<version>
* torch==<version>
### test results
<!-- Add test result screenshot after Step 9 workflows pass -->
Guidelines for initial draft:
[#1234]).git log --format="%h %s | %an" to identify the main author of each feature area.Walk through each New Features section with the user and ask for feedback:
git log --author="<name>") to find commits that may be missing.fbgemm-gpu and torch) with the user.docs/release_notes_<version>.md.Example: For v1.5.0, commits were gathered with:
git log --oneline origin/release/v1.4.0..release/V1.5.0
Draft a release announcement post for the TorchRec FYI Workplace group (see docs/release_post_v1.x.0.md for examples).
The post should follow this structure:
#thanks Supadchaya Puangpontip, Gantaphon Chalumporn, and Benson Ma for coordinating the release from FBGEMM side#thanks Andrey Talman for promoting the release from pytorch dev-infra sideSave the draft post to docs/release_post_<version>.md and review with the user before posting.
Ask the PyTorch infra team to promote the TorchRec build from the test channel to the stable/release channel.
TORCHREC_VERSION in two files:
release/promote.sh — update TORCHREC_VERSION to the new version (e.g., 1.4.0 → 1.5.0)release/release_versions.sh — update TORCHREC_VERSION to the new version (e.g., 1.4.0 → 1.5.0)[test-infra] update TorchRec release version to v<version>torchrec.__version__ output.Example PR: https://github.com/pytorch/test-infra/pull/7557
testing
Generate tests for TorchRec source files with correct patterns (unit, distributed, hypothesis), proper BUCK targets, and test utilities. Use when asked to generate tests, add test coverage, or write tests for a module.
development
Find and remove tech debt (redundant/duplicated code), run linters, and ensure code quality in recent changes
development
Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill for TorchRec, or needs help with SKILL.md files.
testing
Investigate and explain TorchRec planner sharding statistics output, especially how HBM storage is computed per table and per rank. Use when the user asks about sharding stats, storage breakdown, or memory estimation.