Upload policy_config.py with huggingface_hub
Browse files- policy_config.py +102 -0
policy_config.py
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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': 10,
|
15 |
+
'evaluator_env_num': 8,
|
16 |
+
'act_scale': True,
|
17 |
+
'n_evaluator_episode': 8
|
18 |
+
},
|
19 |
+
'policy': {
|
20 |
+
'model': {
|
21 |
+
'twin_critic': True,
|
22 |
+
'action_space': 'reparameterization',
|
23 |
+
'obs_shape': 3,
|
24 |
+
'action_shape': 1,
|
25 |
+
'actor_head_hidden_size': 128,
|
26 |
+
'critic_head_hidden_size': 128
|
27 |
+
},
|
28 |
+
'learn': {
|
29 |
+
'learner': {
|
30 |
+
'train_iterations': 1000000000,
|
31 |
+
'dataloader': {
|
32 |
+
'num_workers': 0
|
33 |
+
},
|
34 |
+
'log_policy': True,
|
35 |
+
'hook': {
|
36 |
+
'load_ckpt_before_run': '',
|
37 |
+
'log_show_after_iter': 100,
|
38 |
+
'save_ckpt_after_iter': 10000,
|
39 |
+
'save_ckpt_after_run': True
|
40 |
+
},
|
41 |
+
'cfg_type': 'BaseLearnerDict'
|
42 |
+
},
|
43 |
+
'update_per_collect': 1,
|
44 |
+
'batch_size': 128,
|
45 |
+
'learning_rate_q': 0.001,
|
46 |
+
'learning_rate_policy': 0.001,
|
47 |
+
'learning_rate_alpha': 0.0003,
|
48 |
+
'target_theta': 0.005,
|
49 |
+
'discount_factor': 0.99,
|
50 |
+
'alpha': 0.2,
|
51 |
+
'auto_alpha': True,
|
52 |
+
'log_space': True,
|
53 |
+
'target_entropy': None,
|
54 |
+
'ignore_done': True,
|
55 |
+
'init_w': 0.003
|
56 |
+
},
|
57 |
+
'collect': {
|
58 |
+
'collector': {},
|
59 |
+
'n_sample': 10,
|
60 |
+
'unroll_len': 1,
|
61 |
+
'collector_logit': False
|
62 |
+
},
|
63 |
+
'eval': {
|
64 |
+
'evaluator': {
|
65 |
+
'eval_freq': 100,
|
66 |
+
'render': {
|
67 |
+
'render_freq': -1,
|
68 |
+
'mode': 'train_iter'
|
69 |
+
},
|
70 |
+
'cfg_type': 'InteractionSerialEvaluatorDict',
|
71 |
+
'n_episode': 8,
|
72 |
+
'stop_value': -250
|
73 |
+
}
|
74 |
+
},
|
75 |
+
'other': {
|
76 |
+
'replay_buffer': {
|
77 |
+
'replay_buffer_size': 100000
|
78 |
+
}
|
79 |
+
},
|
80 |
+
'on_policy': False,
|
81 |
+
'cuda': False,
|
82 |
+
'multi_gpu': False,
|
83 |
+
'bp_update_sync': True,
|
84 |
+
'traj_len_inf': False,
|
85 |
+
'type': 'sac',
|
86 |
+
'priority': False,
|
87 |
+
'priority_IS_weight': False,
|
88 |
+
'random_collect_size': 1000,
|
89 |
+
'transition_with_policy_data': True,
|
90 |
+
'multi_agent': False,
|
91 |
+
'cfg_type': 'SACPolicyDict'
|
92 |
+
},
|
93 |
+
'exp_name': 'Pendulum-v1-SAC',
|
94 |
+
'seed': 0,
|
95 |
+
'wandb_logger': {
|
96 |
+
'gradient_logger': True,
|
97 |
+
'video_logger': True,
|
98 |
+
'plot_logger': True,
|
99 |
+
'action_logger': True,
|
100 |
+
'return_logger': False
|
101 |
+
}
|
102 |
+
}
|