Skip to content

Commit

Permalink
pretty_log
Browse files Browse the repository at this point in the history
  • Loading branch information
kingh0730 committed Nov 29, 2023
1 parent 94f8348 commit a6d61f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion AutoCkt/ML/autockt_ml/autockt_gym.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
import json
from pathlib import Path
from dataclasses import asdict

Expand Down Expand Up @@ -136,8 +137,9 @@ def step(self, action):
"ideal_output_norm": ideal_norm,
"observation": observation,
}
pretty_log = json.dumps(log, indent=4)
with open(self.log_file, "a") as f:
f.write(f"{log}\n")
f.write(f"{pretty_log}\n")

self.num_steps += 1

Expand Down

0 comments on commit a6d61f7

Please sign in to comment.