Skip to content

Commit 9c240ae

Browse files
committed
Add creation of release_matrix.json to gen_quick_start_module.py
The PyTorch website needs access to the "release matrix" in the same way it can access published_version.json to generate the config needed for the "Start Locally" page.
1 parent d0dc1eb commit 9c240ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/gen_quick_start_module.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ def write_published_versions(versions):
8383
with open(BASE_DIR / "published_versions.json", "w") as outfile:
8484
json.dump(versions, outfile, indent=2)
8585

86+
def write_release_matrix(matrix):
87+
with open(BASE_DIR / "release_matrix.json", "w") as outfile:
88+
json.dump(matrix, outfile, indent=2)
8689

8790
def read_matrix_for_os(osys: OperatingSystem, channel: str):
8891
jsonfile = load_json_from_basedir(f"{osys.value}_{channel}_matrix.json")
@@ -242,6 +245,8 @@ def main():
242245
for osys in OperatingSystem:
243246
release_matrix[val][osys.value] = read_matrix_for_os(osys, val)
244247

248+
write_release_matrix(release_matrix)
249+
245250
extract_arch_ver_map(release_matrix)
246251
for val in ("nightly", "release"):
247252
update_versions(versions, release_matrix[val], val)

0 commit comments

Comments
 (0)