Skip to content

Commit 31a69c1

Browse files
authored
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 0047321 commit 31a69c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/gen_quick_start_module.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ def write_published_versions(versions):
7878
with open(BASE_DIR / "published_versions.json", "w") as outfile:
7979
json.dump(versions, outfile, indent=2)
8080

81+
def write_release_matrix(matrix):
82+
with open(BASE_DIR / "release_matrix.json", "w") as outfile:
83+
json.dump(versions, outfile, indent=2)
84+
8185
def read_matrix_for_os(osys: OperatingSystem, channel: str):
8286
jsonfile = load_json_from_basedir(f"{osys.value}_{channel}_matrix.json")
8387
return jsonfile["include"]
@@ -208,6 +212,8 @@ def main():
208212
for osys in OperatingSystem:
209213
release_matrix[val][osys.value] = read_matrix_for_os(osys, val)
210214

215+
write_release_matrix(release_matrix)
216+
211217
extract_arch_ver_map(release_matrix)
212218
for val in ("nightly", "release"):
213219
update_versions(versions, release_matrix[val], val)

0 commit comments

Comments
 (0)