pytorch/.github/scripts
Nikita Shulga 408fa38f33 [GHF] Validate graphql output (#83366)
If checkrun nodes are not instance of dictionary, skip them

Should prevent  https://github.com/pytorch/pytorch/pull/83215#issuecomment-1213617665 from happening in the future

Pull Request resolved: https://github.com/pytorch/pytorch/pull/83366
Approved by: https://github.com/kit1980
2022-08-13 13:41:30 +00:00
..
build_publish_nightly_docker.sh
convert_lintrunner_annotations_to_github.py
ensure_actions_will_cancel.py
export_pytorch_labels.py
fetch_latest_green_commit.py updated file names for viable-strict script (#82414) 2022-07-29 15:23:35 +00:00
generate_binary_build_matrix.py [ROCm] update nightly builds to rocm5.2 (#82353) 2022-08-11 00:33:59 +00:00
generate_ci_workflows.py
generate_pytorch_version.py
get_workflow_job_id.py Fix get_workflow_job_id to dynamically get the repo name (#83036) 2022-08-09 21:30:25 +00:00
gitutils.py [GH1] replace globs with patterns that mergebot can process (#81414) 2022-07-19 16:11:32 +00:00
gql_mocks.json Allow PR collaborators revert PRs (#82360) 2022-07-29 01:52:14 +00:00
install_nvidia_utils_linux.sh Enable periodic builds for CUDA 11.7 (#81688) 2022-08-10 00:03:51 +00:00
kill_active_ssh_sessions.ps1
lint_native_functions.py
parse_ref.py
process_commit.py
README.md
report_git_status.sh
run_torchbench.py
test_fetch_latest_green_commit.py updated file names for viable-strict script (#82414) 2022-07-29 15:23:35 +00:00
test_gitutils.py [GH1] replace globs with patterns that mergebot can process (#81414) 2022-07-19 16:11:32 +00:00
test_trymerge.py Abstract away git repo during tests (#82594) 2022-08-02 06:56:46 +00:00
test_tryrebase.py
trymerge.py [GHF] Validate graphql output (#83366) 2022-08-13 13:41:30 +00:00
trymerge_explainer.py [mergebot] Update merge bot messages to explain flags (#82907) 2022-08-11 14:25:15 +00:00
tryrebase.py rebase via comment - ghstack commit author fix (#80747) 2022-07-01 02:03:16 +00:00
update_commit_hashes.py only update pinned hash if new hash is newer than old hash (#82173) 2022-07-26 20:02:23 +00:00
wait_for_ssh_to_drain.ps1
wait_for_ssh_to_drain.sh

pytorch/.github

NOTE: This README contains information for the .github directory but cannot be located there because it will overwrite the repo README.

This directory contains workflows and scripts to support our CI infrastructure that runs on Github Actions.

Workflows

  • Pull CI (pull.yml) is run on PRs and on master.
  • Trunk CI (trunk.yml) is run on trunk to validate incoming commits. Trunk jobs are usually more expensive to run so we do not run them on PRs unless specified.
  • Scheduled CI (periodic.yml) is a subset of trunk CI that is run every few hours on master.
  • Binary CI is run to package binaries for distribution for all platforms.

Templates

Templates written in Jinja are located in the .github/templates directory and used to generate workflow files for binary jobs found in the .github/workflows/ directory. These are also a couple of utility templates used to discern common utilities that can be used amongst different templates.

(Re)Generating workflow files

You will need jinja2 in order to regenerate the workflow files which can be installed using:

pip install -r .github/requirements.txt

Workflows can be generated / regenerated using the following command:

.github/regenerate.sh

Adding a new generated binary workflow

New generated binary workflows can be added in the .github/scripts/generate_ci_workflows.py script. You can reference examples from that script in order to add the workflow to the stream that is relevant to what you particularly care about.

Different parameters can be used to acheive different goals, i.e. running jobs on a cron, running only on trunk, etc.

ciflow (trunk)

The label ciflow/trunk can be used to run trunk only workflows. This is especially useful if trying to re-land a PR that was reverted for failing a non-default workflow.

Infra

Currently most of our self hosted runners are hosted on AWS, for a comprehensive list of available runner types you can reference .github/scale-config.yml.

Exceptions to AWS for self hosted:

  • ROCM runners

Adding new runner types

New runner types can be added by committing changes to .github/scale-config.yml. Example: https://github.com/pytorch/pytorch/pull/70474

NOTE: New runner types can only be used once the changes to .github/scale-config.yml have made their way into the default branch