zhangpaipai
commited on
Commit
•
c544c97
1
Parent(s):
c995e61
Upload policy_config.py with huggingface_hub
Browse files- policy_config.py +111 -0
policy_config.py
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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': 6000,
|
14 |
+
'env_id': 'Walker2d-v3',
|
15 |
+
'norm_obs': {
|
16 |
+
'use_norm': False
|
17 |
+
},
|
18 |
+
'norm_reward': {
|
19 |
+
'use_norm': False
|
20 |
+
},
|
21 |
+
'collector_env_num': 1,
|
22 |
+
'evaluator_env_num': 8,
|
23 |
+
'n_evaluator_episode': 8
|
24 |
+
},
|
25 |
+
'policy': {
|
26 |
+
'model': {
|
27 |
+
'twin_critic': True,
|
28 |
+
'obs_shape': 17,
|
29 |
+
'action_shape': 6,
|
30 |
+
'actor_head_hidden_size': 256,
|
31 |
+
'critic_head_hidden_size': 256,
|
32 |
+
'action_space': 'regression'
|
33 |
+
},
|
34 |
+
'learn': {
|
35 |
+
'learner': {
|
36 |
+
'train_iterations': 1000000000,
|
37 |
+
'dataloader': {
|
38 |
+
'num_workers': 0
|
39 |
+
},
|
40 |
+
'log_policy': True,
|
41 |
+
'hook': {
|
42 |
+
'load_ckpt_before_run': '',
|
43 |
+
'log_show_after_iter': 100,
|
44 |
+
'save_ckpt_after_iter': 10000,
|
45 |
+
'save_ckpt_after_run': True
|
46 |
+
},
|
47 |
+
'cfg_type': 'BaseLearnerDict'
|
48 |
+
},
|
49 |
+
'update_per_collect': 1,
|
50 |
+
'batch_size': 256,
|
51 |
+
'learning_rate_actor': 0.001,
|
52 |
+
'learning_rate_critic': 0.001,
|
53 |
+
'ignore_done': False,
|
54 |
+
'target_theta': 0.005,
|
55 |
+
'discount_factor': 0.99,
|
56 |
+
'actor_update_freq': 2,
|
57 |
+
'noise': True,
|
58 |
+
'noise_sigma': 0.2,
|
59 |
+
'noise_range': {
|
60 |
+
'min': -0.5,
|
61 |
+
'max': 0.5
|
62 |
+
}
|
63 |
+
},
|
64 |
+
'collect': {
|
65 |
+
'collector': {},
|
66 |
+
'unroll_len': 1,
|
67 |
+
'noise_sigma': 0.1,
|
68 |
+
'n_sample': 1
|
69 |
+
},
|
70 |
+
'eval': {
|
71 |
+
'evaluator': {
|
72 |
+
'eval_freq': 5000,
|
73 |
+
'render': {
|
74 |
+
'render_freq': -1,
|
75 |
+
'mode': 'train_iter'
|
76 |
+
},
|
77 |
+
'cfg_type': 'InteractionSerialEvaluatorDict',
|
78 |
+
'n_episode': 8,
|
79 |
+
'stop_value': 6000
|
80 |
+
}
|
81 |
+
},
|
82 |
+
'other': {
|
83 |
+
'replay_buffer': {
|
84 |
+
'replay_buffer_size': 1000000
|
85 |
+
}
|
86 |
+
},
|
87 |
+
'on_policy': False,
|
88 |
+
'cuda': True,
|
89 |
+
'multi_gpu': False,
|
90 |
+
'bp_update_sync': True,
|
91 |
+
'traj_len_inf': False,
|
92 |
+
'type': 'td3',
|
93 |
+
'priority': False,
|
94 |
+
'priority_IS_weight': False,
|
95 |
+
'random_collect_size': 25000,
|
96 |
+
'transition_with_policy_data': False,
|
97 |
+
'action_space': 'continuous',
|
98 |
+
'reward_batch_norm': False,
|
99 |
+
'multi_agent': False,
|
100 |
+
'cfg_type': 'TD3PolicyDict'
|
101 |
+
},
|
102 |
+
'exp_name': 'Walker2d-v3-TD3',
|
103 |
+
'seed': 0,
|
104 |
+
'wandb_logger': {
|
105 |
+
'gradient_logger': True,
|
106 |
+
'video_logger': True,
|
107 |
+
'plot_logger': True,
|
108 |
+
'action_logger': True,
|
109 |
+
'return_logger': False
|
110 |
+
}
|
111 |
+
}
|