Commit
·
57baf01
1
Parent(s):
90d0a90
Upload policy_config.py with huggingface_hub
Browse files- policy_config.py +101 -0
policy_config.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
exp_config = {
|
| 2 |
+
'env': {
|
| 3 |
+
'manager': {
|
| 4 |
+
'episode_num': float("inf"),
|
| 5 |
+
'max_retry': 1,
|
| 6 |
+
'retry_type': 'reset',
|
| 7 |
+
'auto_reset': True,
|
| 8 |
+
'step_timeout': None,
|
| 9 |
+
'reset_timeout': None,
|
| 10 |
+
'retry_waiting_time': 0.1,
|
| 11 |
+
'cfg_type': 'BaseEnvManagerDict'
|
| 12 |
+
},
|
| 13 |
+
'stop_value': -250,
|
| 14 |
+
'collector_env_num': 8,
|
| 15 |
+
'evaluator_env_num': 5,
|
| 16 |
+
'act_scale': True,
|
| 17 |
+
'n_evaluator_episode': 5
|
| 18 |
+
},
|
| 19 |
+
'policy': {
|
| 20 |
+
'model': {
|
| 21 |
+
'obs_shape': 3,
|
| 22 |
+
'action_shape': 1,
|
| 23 |
+
'twin_critic': False,
|
| 24 |
+
'action_space': 'regression'
|
| 25 |
+
},
|
| 26 |
+
'learn': {
|
| 27 |
+
'learner': {
|
| 28 |
+
'train_iterations': 1000000000,
|
| 29 |
+
'dataloader': {
|
| 30 |
+
'num_workers': 0
|
| 31 |
+
},
|
| 32 |
+
'log_policy': True,
|
| 33 |
+
'hook': {
|
| 34 |
+
'load_ckpt_before_run': '',
|
| 35 |
+
'log_show_after_iter': 100,
|
| 36 |
+
'save_ckpt_after_iter': 10000,
|
| 37 |
+
'save_ckpt_after_run': True
|
| 38 |
+
},
|
| 39 |
+
'cfg_type': 'BaseLearnerDict'
|
| 40 |
+
},
|
| 41 |
+
'update_per_collect': 2,
|
| 42 |
+
'batch_size': 128,
|
| 43 |
+
'learning_rate_actor': 0.001,
|
| 44 |
+
'learning_rate_critic': 0.001,
|
| 45 |
+
'ignore_done': True,
|
| 46 |
+
'target_theta': 0.005,
|
| 47 |
+
'discount_factor': 0.99,
|
| 48 |
+
'actor_update_freq': 1,
|
| 49 |
+
'noise': False
|
| 50 |
+
},
|
| 51 |
+
'collect': {
|
| 52 |
+
'collector': {
|
| 53 |
+
'collect_print_freq': 1000
|
| 54 |
+
},
|
| 55 |
+
'unroll_len': 1,
|
| 56 |
+
'noise_sigma': 0.1,
|
| 57 |
+
'n_sample': 48
|
| 58 |
+
},
|
| 59 |
+
'eval': {
|
| 60 |
+
'evaluator': {
|
| 61 |
+
'eval_freq': 100,
|
| 62 |
+
'render': {
|
| 63 |
+
'render_freq': -1,
|
| 64 |
+
'mode': 'train_iter'
|
| 65 |
+
},
|
| 66 |
+
'cfg_type': 'InteractionSerialEvaluatorDict',
|
| 67 |
+
'n_episode': 5,
|
| 68 |
+
'stop_value': -250
|
| 69 |
+
}
|
| 70 |
+
},
|
| 71 |
+
'other': {
|
| 72 |
+
'replay_buffer': {
|
| 73 |
+
'replay_buffer_size': 20000,
|
| 74 |
+
'max_use': 16
|
| 75 |
+
}
|
| 76 |
+
},
|
| 77 |
+
'on_policy': False,
|
| 78 |
+
'cuda': False,
|
| 79 |
+
'multi_gpu': False,
|
| 80 |
+
'bp_update_sync': True,
|
| 81 |
+
'traj_len_inf': False,
|
| 82 |
+
'type': 'ddpg',
|
| 83 |
+
'priority': False,
|
| 84 |
+
'priority_IS_weight': False,
|
| 85 |
+
'random_collect_size': 800,
|
| 86 |
+
'transition_with_policy_data': False,
|
| 87 |
+
'action_space': 'continuous',
|
| 88 |
+
'reward_batch_norm': False,
|
| 89 |
+
'multi_agent': False,
|
| 90 |
+
'cfg_type': 'DDPGPolicyDict'
|
| 91 |
+
},
|
| 92 |
+
'exp_name': 'Pendulum-v1-DDPG',
|
| 93 |
+
'seed': 0,
|
| 94 |
+
'wandb_logger': {
|
| 95 |
+
'gradient_logger': True,
|
| 96 |
+
'video_logger': True,
|
| 97 |
+
'plot_logger': True,
|
| 98 |
+
'action_logger': True,
|
| 99 |
+
'return_logger': False
|
| 100 |
+
}
|
| 101 |
+
}
|