xref: /aosp_15_r20/external/pytorch/.ci/pytorch/perf_test/update_commit_hash.py (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1import json
2import sys
3
4
5data_file_path = sys.argv[1]
6commit_hash = sys.argv[2]
7
8with open(data_file_path) as data_file:
9    data = json.load(data_file)
10
11data["commit"] = commit_hash
12
13with open(data_file_path, "w") as data_file:
14    json.dump(data, data_file)
15