Skip to content

Commit

Permalink
Format JSON in output
Browse files Browse the repository at this point in the history
  • Loading branch information
ots22 committed Apr 1, 2020
1 parent d27282c commit 4d17d53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion privacy-metrics/disclosure_risk.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def main():
print(f"\nDisclosure risk metrics: {metrics}")

with open(path_released_ds + "/disclosure_risk.json", 'w') as f:
json.dump(metrics, f)
json.dump(metrics, f, indent=4)

if __name__=='__main__':
main()
2 changes: 1 addition & 1 deletion utility-metrics/sklearn_classifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def utility_measure_sklearn_classifiers(synth_method, path_original_ds, path_ori
for iw in warns: print(iw.message)

with open(output_file_json, "w") as out_fio:
json.dump(utility_collector, out_fio)
json.dump(utility_collector, out_fio, indent=4)


def handle_cmdline_args():
Expand Down

0 comments on commit 4d17d53

Please sign in to comment.