Merge pull request #156 from ctuning/master

changing "wb" to "w" when saving json file (text mode)
This commit is contained in:
Cedric Nugteren 2017-05-24 20:18:41 +02:00 committed by GitHub
commit 9c703a6021
2 changed files with 2 additions and 2 deletions

View file

@ -120,7 +120,7 @@ def benchmark_single(benchmark, platform, device, num_runs, precision, load_from
# Stores the results to disk
print("[benchmark] Saving benchmark results to '" + json_file_name + "'")
with open(json_file_name, "wb") as f:
with open(json_file_name, "w") as f:
json.dump(results, f, sort_keys=True, indent=4)
# Retrieves the data from the benchmark settings

View file

@ -32,7 +32,7 @@ def load_database(filename):
def save_database(database, filename):
"""Saves a database to disk"""
print("[database] Saving database to '" + filename + "'")
with open(filename, "wb") as f:
with open(filename, "w") as f:
json.dump(database, f, sort_keys=True, indent=4)