Skip to content

Conversation

@zklaus
Copy link
Collaborator

@zklaus zklaus commented Dec 16, 2025

This is a fork of the actions/checkout action.
The main addition is the ability to apply filters to submodule handling and the ability to do single branch checkouts also for non-shallow checkouts.
For this, it adds the single-branch and submodules-filter option as described in the Usage section of the updated README.md.

The purpose is to use these extensions to cut down on checkout time in the multitude of ci jobs that need to check out the pytorch repository as discussed in pytorch/pytorch#169184.

The updated README.md file also includes instructions for future updates to newer versions of the upstream action.

Some timings are taken from pytorch/pytorch#167737:

Workflow Time on viable/strict Time here Time Saving
Lint/lintrunner-noclang 2m42s 55s 1m47s
linux-jammy-py3.14-clang12/build (via _linux-build) 2m30s 1m29s 61s
linux-jammy-cuda12.8-cudnn9-py3.10-clang12 / build (via _linux-build) 2m31s 1m33s 59s

In other words, we can save ~1m per checkout where shallow checkouts are not feasible, which includes build and test jobs on trunk and pull.

With a total of 276 jobs on trunk at the moment and ~90 jobs on a pull request, assuming ~70 PRs per day, the cumulative savings with savings of 1 minute per checkout could be between 75 and 150 hours.

@vercel
Copy link

vercel bot commented Dec 16, 2025

@zklaus is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 16, 2025
@zklaus zklaus force-pushed the add-checkout-action branch from 0fb364e to 9531665 Compare December 18, 2025 09:50
@zklaus zklaus marked this pull request as ready for review December 18, 2025 15:37
@zklaus zklaus requested a review from atalman December 18, 2025 15:37
@atalman
Copy link
Contributor

atalman commented Jan 8, 2026

Could you please include stats, what is the time saving when checking out single instance pytorch and small calculation of time saving per PR in average.
Also would be nice to include the details of this project in Wiki here: https://github.com/pytorch/test-infra/wiki
How to onboard and how to maintain the action in runbook style approach.

Copy link
Contributor

@atalman atalman left a comment

Choose a reason for hiding this comment

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

lgtm

@atalman atalman merged commit 07fb242 into pytorch:main Jan 13, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants