pytorch/.ci/pytorch/perf_test/update_commit_hash.py

14 lines
259 B
Python
Raw Normal View History

2023-11-08 09:01:59 -07:00
import sys
import json
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)