mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-29 03:04:55 +08:00
Signed-off-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/106052 Approved by: https://github.com/albanD, https://github.com/Skylion007
14 lines
259 B
Python
14 lines
259 B
Python
import json
|
|
import sys
|
|
|
|
data_file_path = sys.argv[1]
|
|
commit_hash = sys.argv[2]
|
|
|
|
with open(data_file_path) as data_file:
|
|
data = json.load(data_file)
|
|
|
|
data["commit"] = commit_hash
|
|
|
|
with open(data_file_path, "w") as data_file:
|
|
json.dump(data, data_file)
|