From 9822de92a90ce7c735638d6a397ff5114c202ca2 Mon Sep 17 00:00:00 2001 From: HAN Date: Fri, 3 Dec 2021 13:15:11 +0900 Subject: [PATCH] Fix save config.py to config.yaml --- rl_algorithms/common/abstract/distributed_logger.py | 2 +- rl_algorithms/common/abstract/learner.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rl_algorithms/common/abstract/distributed_logger.py b/rl_algorithms/common/abstract/distributed_logger.py index 87cb0104..9a6dca42 100644 --- a/rl_algorithms/common/abstract/distributed_logger.py +++ b/rl_algorithms/common/abstract/distributed_logger.py @@ -129,7 +129,7 @@ def set_wandb(self): max_episode_steps=self.max_episode_steps, ) wandb.config.update(additional_log) - shutil.copy(self.log_cfg.cfg_path, os.path.join(wandb.run.dir, "config.py")) + shutil.copy(self.log_cfg.cfg_path, os.path.join(wandb.run.dir, "config.yaml")) def recv_log_info(self): """Receive info from learner.""" diff --git a/rl_algorithms/common/abstract/learner.py b/rl_algorithms/common/abstract/learner.py index 0edc63b2..b6b2826a 100644 --- a/rl_algorithms/common/abstract/learner.py +++ b/rl_algorithms/common/abstract/learner.py @@ -70,7 +70,7 @@ def __init__( os.makedirs(self.ckpt_path, exist_ok=True) # save configuration - shutil.copy(log_cfg.cfg_path, os.path.join(self.ckpt_path, "config.py")) + shutil.copy(log_cfg.cfg_path, os.path.join(self.ckpt_path, "config.yaml")) @abstractmethod def _init_network(self):