pass step as kwarg

这个提交包含在:
Alexander Soare
2024-04-15 09:52:54 +01:00
父节点 2ccf89d78c
当前提交 9241b5e830
共有 2 个文件被更改,包括 2 次插入 和 2 次删除

查看文件

@ -130,7 +130,7 @@ def eval_policy(
# get the next action for the environment
with torch.inference_mode():
action = policy.select_action(observation, step)
action = policy.select_action(observation, step=step)
# apply inverse transform to unnormalize the action
action = postprocess_action(action, transform)

查看文件

@ -251,7 +251,7 @@ def train(cfg: dict, out_dir=None, job_name=None):
for key in batch:
batch[key] = batch[key].to(cfg.device, non_blocking=True)
train_info = policy(batch, step)
train_info = policy(batch, step=step)
# TODO(rcadene): is it ok if step_t=0 = 0 and not 1 as previously done?
if step % cfg.log_freq == 0: