Skip to content

Commit

Permalink
Write csv dict copy
Browse files Browse the repository at this point in the history
  • Loading branch information
vakker committed Sep 16, 2020
1 parent 757a994 commit a1da98e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hetsage/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def __init__(self, *args, **kwargs):
self.csv_writer = None

def write_csv(self, metrics, global_step):
metrics = metrics.copy()
metrics.update({'epoch': global_step})
if self.csv_writer is None:
self.csv_writer = csv.DictWriter(self.csv_file, fieldnames=metrics.keys())
Expand Down

0 comments on commit a1da98e

Please sign in to comment.