Upload policy_config.py with huggingface_hub
Browse files- policy_config.py +91 -0
policy_config.py
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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': 240,
|
14 |
+
'collector_env_num': 8,
|
15 |
+
'evaluator_env_num': 8,
|
16 |
+
'env_id': 'LunarLander-v2',
|
17 |
+
'n_evaluator_episode': 8
|
18 |
+
},
|
19 |
+
'policy': {
|
20 |
+
'model': {
|
21 |
+
'obs_shape': 8,
|
22 |
+
'action_shape': 4
|
23 |
+
},
|
24 |
+
'learn': {
|
25 |
+
'learner': {
|
26 |
+
'train_iterations': 1000000000,
|
27 |
+
'dataloader': {
|
28 |
+
'num_workers': 0
|
29 |
+
},
|
30 |
+
'log_policy': True,
|
31 |
+
'hook': {
|
32 |
+
'load_ckpt_before_run': '',
|
33 |
+
'log_show_after_iter': 100,
|
34 |
+
'save_ckpt_after_iter': 10000,
|
35 |
+
'save_ckpt_after_run': True
|
36 |
+
},
|
37 |
+
'cfg_type': 'BaseLearnerDict'
|
38 |
+
},
|
39 |
+
'update_per_collect': 1,
|
40 |
+
'batch_size': 160,
|
41 |
+
'learning_rate': 0.0003,
|
42 |
+
'betas': [0.9, 0.999],
|
43 |
+
'eps': 1e-08,
|
44 |
+
'grad_norm': 0.5,
|
45 |
+
'value_weight': 0.5,
|
46 |
+
'entropy_weight': 0.001,
|
47 |
+
'adv_norm': True,
|
48 |
+
'ignore_done': False
|
49 |
+
},
|
50 |
+
'collect': {
|
51 |
+
'collector': {},
|
52 |
+
'unroll_len': 1,
|
53 |
+
'discount_factor': 0.99,
|
54 |
+
'gae_lambda': 0.95,
|
55 |
+
'n_sample': 320
|
56 |
+
},
|
57 |
+
'eval': {
|
58 |
+
'evaluator': {
|
59 |
+
'eval_freq': 1000,
|
60 |
+
'render': {
|
61 |
+
'render_freq': -1,
|
62 |
+
'mode': 'train_iter'
|
63 |
+
},
|
64 |
+
'cfg_type': 'InteractionSerialEvaluatorDict',
|
65 |
+
'n_episode': 8,
|
66 |
+
'stop_value': 240
|
67 |
+
}
|
68 |
+
},
|
69 |
+
'other': {
|
70 |
+
'replay_buffer': {}
|
71 |
+
},
|
72 |
+
'on_policy': True,
|
73 |
+
'cuda': True,
|
74 |
+
'multi_gpu': False,
|
75 |
+
'bp_update_sync': True,
|
76 |
+
'traj_len_inf': False,
|
77 |
+
'type': 'a2c',
|
78 |
+
'priority': False,
|
79 |
+
'priority_IS_weight': False,
|
80 |
+
'cfg_type': 'A2CPolicyDict'
|
81 |
+
},
|
82 |
+
'exp_name': 'Lunarlander-v2-A2C',
|
83 |
+
'wandb_logger': {
|
84 |
+
'gradient_logger': True,
|
85 |
+
'video_logger': True,
|
86 |
+
'plot_logger': True,
|
87 |
+
'action_logger': True,
|
88 |
+
'return_logger': False
|
89 |
+
},
|
90 |
+
'seed': 0
|
91 |
+
}
|