Upload policy_config.py with huggingface_hub
Browse files- policy_config.py +99 -0
policy_config.py
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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': 10000000000,
|
14 |
+
'n_evaluator_episode': 8,
|
15 |
+
'collector_env_num': 16,
|
16 |
+
'evaluator_env_num': 8,
|
17 |
+
'env_id': 'QbertNoFrameskip-v4',
|
18 |
+
'frame_stack': 4
|
19 |
+
},
|
20 |
+
'policy': {
|
21 |
+
'model': {
|
22 |
+
'obs_shape': [4, 84, 84],
|
23 |
+
'action_shape': 6,
|
24 |
+
'encoder_hidden_size_list': [32, 64, 64, 128],
|
25 |
+
'actor_head_hidden_size': 128,
|
26 |
+
'critic_head_hidden_size': 128,
|
27 |
+
'critic_head_layer_num': 2
|
28 |
+
},
|
29 |
+
'learn': {
|
30 |
+
'learner': {
|
31 |
+
'train_iterations': 1000000000,
|
32 |
+
'dataloader': {
|
33 |
+
'num_workers': 0
|
34 |
+
},
|
35 |
+
'log_policy': True,
|
36 |
+
'hook': {
|
37 |
+
'load_ckpt_before_run': '',
|
38 |
+
'log_show_after_iter': 100,
|
39 |
+
'save_ckpt_after_iter': 10000,
|
40 |
+
'save_ckpt_after_run': True
|
41 |
+
},
|
42 |
+
'cfg_type': 'BaseLearnerDict'
|
43 |
+
},
|
44 |
+
'update_per_collect': 18,
|
45 |
+
'batch_size': 128,
|
46 |
+
'learning_rate': 0.0001,
|
47 |
+
'value_weight': 1.0,
|
48 |
+
'entropy_weight': 0.005,
|
49 |
+
'clip_ratio': 0.1,
|
50 |
+
'adv_norm': False,
|
51 |
+
'ignore_done': False
|
52 |
+
},
|
53 |
+
'collect': {
|
54 |
+
'collector': {},
|
55 |
+
'unroll_len': 1,
|
56 |
+
'discount_factor': 0.99,
|
57 |
+
'gae_lambda': 0.95,
|
58 |
+
'n_sample': 1024
|
59 |
+
},
|
60 |
+
'eval': {
|
61 |
+
'evaluator': {
|
62 |
+
'eval_freq': 1000,
|
63 |
+
'render': {
|
64 |
+
'render_freq': -1,
|
65 |
+
'mode': 'train_iter'
|
66 |
+
},
|
67 |
+
'cfg_type': 'InteractionSerialEvaluatorDict',
|
68 |
+
'stop_value': 10000000000,
|
69 |
+
'n_episode': 8
|
70 |
+
}
|
71 |
+
},
|
72 |
+
'other': {
|
73 |
+
'replay_buffer': {
|
74 |
+
'replay_buffer_size': 10000
|
75 |
+
}
|
76 |
+
},
|
77 |
+
'on_policy': False,
|
78 |
+
'cuda': True,
|
79 |
+
'multi_gpu': False,
|
80 |
+
'bp_update_sync': True,
|
81 |
+
'traj_len_inf': False,
|
82 |
+
'type': 'ppo',
|
83 |
+
'priority': False,
|
84 |
+
'priority_IS_weight': False,
|
85 |
+
'nstep_return': False,
|
86 |
+
'nstep': 3,
|
87 |
+
'transition_with_policy_data': True,
|
88 |
+
'cfg_type': 'PPOOffPolicyDict'
|
89 |
+
},
|
90 |
+
'exp_name': 'QbertNoFrameskip-v4-PPOOffPolicy',
|
91 |
+
'wandb_logger': {
|
92 |
+
'gradient_logger': True,
|
93 |
+
'video_logger': True,
|
94 |
+
'plot_logger': True,
|
95 |
+
'action_logger': True,
|
96 |
+
'return_logger': False
|
97 |
+
},
|
98 |
+
'seed': 0
|
99 |
+
}
|