Skip to content

Commit

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

# PyPI imports
Expand Down Expand Up @@ -121,7 +123,23 @@ def step(self, action):
]
)

# TODO update env steps
# ----------------- Tensorboard -----------------
log = {
"step": self.num_steps,
"done": done,
"reward": reward,
"action": action,
"curr_inputs": cur_params,
"curr_outputs": cur_spec,
"ideal_outputs": ideal_spec,
"curr_output_norm": cur_norm,
"ideal_output_norm": ideal_norm,
"observation": observation,
}
with open(self.log_file, "a") as f:
f.write(f"{log}\n")

self.num_steps += 1

return observation, reward, done, {}

Expand Down

0 comments on commit 94f8348

Please sign in to comment.