feat(builder): sort the dict before store to keep consistency

This commit is contained in:
Haoyu Xu
2021-11-10 18:11:07 -05:00
parent 5bd0bdc3f3
commit 8345741c04
2 changed files with 7 additions and 3 deletions

View File

@@ -115,9 +115,13 @@ class Builder:
for thread in threads:
thread.join()
jsonContent = prefix + str(data)
sorted_data = dict()
for i in sorted(data.keys()):
sorted_data[i] = data[i]
json_content = prefix + str(sorted_data)
with open(operator_file, "w") as f:
f.write(jsonContent)
f.write(json_content)
print("Finished building operator data for {}.".format(operator_name))
else: