From 20370357cc842f72e8a5ec630c904790914a486b Mon Sep 17 00:00:00 2001 From: niuyazhe Date: Fri, 19 Jul 2024 16:40:31 +0800 Subject: [PATCH] polish(nyz): remove unused config fields in mujoco PPO --- dizoo/mujoco/config/ant_onppo_config.py | 3 --- dizoo/mujoco/config/halfcheetah_onppo_config.py | 4 +--- dizoo/mujoco/config/hopper_onppo_config.py | 4 +--- dizoo/mujoco/config/walker2d_onppo_config.py | 2 -- dizoo/mujoco/envs/mujoco_env.py | 1 - 5 files changed, 2 insertions(+), 12 deletions(-) diff --git a/dizoo/mujoco/config/ant_onppo_config.py b/dizoo/mujoco/config/ant_onppo_config.py index 32793ffecc..036d651391 100644 --- a/dizoo/mujoco/config/ant_onppo_config.py +++ b/dizoo/mujoco/config/ant_onppo_config.py @@ -5,13 +5,10 @@ exp_name="ant_onppo_seed0", env=dict( env_id='Ant-v3', - norm_obs=dict(use_norm=False, ), - norm_reward=dict(use_norm=False, ), collector_env_num=10, evaluator_env_num=10, n_evaluator_episode=10, stop_value=6000, - manager=dict(shared_memory=False, ) ), policy=dict( cuda=True, diff --git a/dizoo/mujoco/config/halfcheetah_onppo_config.py b/dizoo/mujoco/config/halfcheetah_onppo_config.py index f63f296167..b7646bbede 100644 --- a/dizoo/mujoco/config/halfcheetah_onppo_config.py +++ b/dizoo/mujoco/config/halfcheetah_onppo_config.py @@ -7,8 +7,6 @@ exp_name='halfcheetah_onppo_seed0', env=dict( env_id='HalfCheetah-v3', - norm_obs=dict(use_norm=False, ), - norm_reward=dict(use_norm=False, ), collector_env_num=collector_env_num, evaluator_env_num=evaluator_env_num, n_evaluator_episode=8, @@ -78,4 +76,4 @@ if __name__ == "__main__": # or you can enter `ding -m serial_onpolicy -c halfcheetah_onppo_config.py -s 0` from ding.entry import serial_pipeline_onpolicy - serial_pipeline_onpolicy((main_config, create_config), seed=0) \ No newline at end of file + serial_pipeline_onpolicy((main_config, create_config), seed=0) diff --git a/dizoo/mujoco/config/hopper_onppo_config.py b/dizoo/mujoco/config/hopper_onppo_config.py index 0853aa4abb..6d1c57e70e 100644 --- a/dizoo/mujoco/config/hopper_onppo_config.py +++ b/dizoo/mujoco/config/hopper_onppo_config.py @@ -5,15 +5,13 @@ exp_name='hopper_onppo_seed0', env=dict( env_id='Hopper-v3', - norm_obs=dict(use_norm=False, ), - norm_reward=dict(use_norm=False, ), collector_env_num=8, evaluator_env_num=10, n_evaluator_episode=10, stop_value=4000, ), policy=dict( - cuda=False, + cuda=True, recompute_adv=True, action_space='continuous', model=dict( diff --git a/dizoo/mujoco/config/walker2d_onppo_config.py b/dizoo/mujoco/config/walker2d_onppo_config.py index 2437d62e43..58f5e9054f 100644 --- a/dizoo/mujoco/config/walker2d_onppo_config.py +++ b/dizoo/mujoco/config/walker2d_onppo_config.py @@ -7,8 +7,6 @@ exp_name='walker2d_onppo_seed0', env=dict( env_id='Walker2d-v3', - norm_obs=dict(use_norm=False, ), - norm_reward=dict(use_norm=False, ), collector_env_num=collector_env_num, evaluator_env_num=evaluator_env_num, n_evaluator_episode=8, diff --git a/dizoo/mujoco/envs/mujoco_env.py b/dizoo/mujoco/envs/mujoco_env.py index c150581a5b..700142583b 100644 --- a/dizoo/mujoco/envs/mujoco_env.py +++ b/dizoo/mujoco/envs/mujoco_env.py @@ -151,7 +151,6 @@ def create_collector_env_cfg(cfg: dict) -> List[dict]: def create_evaluator_env_cfg(cfg: dict) -> List[dict]: evaluator_cfg = copy.deepcopy(cfg) evaluator_env_num = evaluator_cfg.pop('evaluator_env_num', 1) - evaluator_cfg.norm_reward.use_norm = False return [evaluator_cfg for _ in range(evaluator_env_num)] @property