Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release matrix json for consumption by PyTorch website #1848

Open
wants to merge 3 commits into
base: site
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/update-quick-start-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ jobs:
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PYTORCHBOT_TOKEN }}
commit-message: Modify published_versions.json file
title: '[Getting Started Page] Modify published_versions.json file'
commit-message: Modify published_versions.json, release_matrix.json and quick-start-module.js
title: '[Getting Started Page] Modify published_versions.json, release_matrix.json and quick-start-module.js'
body: >
This PR is auto-generated. It updates Getting Started page
labels: automated pr
8 changes: 8 additions & 0 deletions scripts/gen_quick_start_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ def write_published_versions(versions):
with open(BASE_DIR / "published_versions.json", "w") as outfile:
json.dump(versions, outfile, indent=2)

# Create release matrix for PyTorch website.
# It's utilized to populate config data for
# the "Start Locally" installation options table.
def write_release_matrix(matrix):
with open(BASE_DIR / "release_matrix.json", "w") as outfile:
json.dump(matrix, outfile, indent=2)

def read_matrix_for_os(osys: OperatingSystem, channel: str):
jsonfile = load_json_from_basedir(f"{osys.value}_{channel}_matrix.json")
Expand Down Expand Up @@ -242,6 +248,8 @@ def main():
for osys in OperatingSystem:
release_matrix[val][osys.value] = read_matrix_for_os(osys, val)

write_release_matrix(release_matrix)

extract_arch_ver_map(release_matrix)
for val in ("nightly", "release"):
update_versions(versions, release_matrix[val], val)
Expand Down