Skip to content

Commit

Permalink
logging params to comet
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaustubh Mani committed Aug 4, 2023
1 parent 80688e3 commit 7a7c6f6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cleanrl/ppo_continuous_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def train(cfg):
)

experiment.add_tag(cfg.tag)

experiment.log_parameters(cfg.ppo)
experiment.log_parameters(cfg.risk)
experiment.log_parameters(cfg.env)
# TRY NOT TO MODIFY: seeding
random.seed(cfg.ppo.seed)
np.random.seed(cfg.ppo.seed)
Expand All @@ -167,7 +169,7 @@ def train(cfg):
agent = RiskAgent(envs=envs).to(device)
if os.path.exists(cfg.risk.risk_model_path):
risk_model = risk_model_class(obs_size=np.array(envs.single_observation_space.shape).prod())
#risk_model.load_state_dict(torch.load(cfg.risk.risk_model_path, map_location=device))
risk_model.load_state_dict(torch.load(cfg.risk.risk_model_path, map_location=device))
risk_model.to(device)
risk_model.eval()
else:
Expand Down Expand Up @@ -300,6 +302,7 @@ def train(cfg):
experiment.log_metric("charts/cummulative_cost", cum_cost, global_step)
last_step = global_step
episode += 1
step_log = 0
if cfg.ppo.collect_data:
make_dirs(storage_path, episode)

Expand Down

0 comments on commit 7a7c6f6

Please sign in to comment.