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': 260,
|
14 |
+
'n_evaluator_episode': 8,
|
15 |
+
'env_id': 'LunarLander-v2',
|
16 |
+
'collector_env_num': 8,
|
17 |
+
'evaluator_env_num': 8
|
18 |
+
},
|
19 |
+
'policy': {
|
20 |
+
'model': {
|
21 |
+
'encoder_hidden_size_list': [512, 64],
|
22 |
+
'obs_shape': 8,
|
23 |
+
'action_shape': 4,
|
24 |
+
'dueling': True
|
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': 10,
|
42 |
+
'batch_size': 64,
|
43 |
+
'learning_rate': 0.001,
|
44 |
+
'target_update_freq': 100,
|
45 |
+
'target_theta': 0.005,
|
46 |
+
'ignore_done': False
|
47 |
+
},
|
48 |
+
'collect': {
|
49 |
+
'collector': {},
|
50 |
+
'n_sample': 64,
|
51 |
+
'unroll_len': 1
|
52 |
+
},
|
53 |
+
'eval': {
|
54 |
+
'evaluator': {
|
55 |
+
'eval_freq': 1000,
|
56 |
+
'render': {
|
57 |
+
'render_freq': -1,
|
58 |
+
'mode': 'train_iter'
|
59 |
+
},
|
60 |
+
'figure_path': None,
|
61 |
+
'cfg_type': 'InteractionSerialEvaluatorDict',
|
62 |
+
'stop_value': 260,
|
63 |
+
'n_episode': 8
|
64 |
+
}
|
65 |
+
},
|
66 |
+
'other': {
|
67 |
+
'replay_buffer': {
|
68 |
+
'replay_buffer_size': 100000
|
69 |
+
},
|
70 |
+
'eps': {
|
71 |
+
'type': 'exp',
|
72 |
+
'start': 0.95,
|
73 |
+
'end': 0.1,
|
74 |
+
'decay': 50000
|
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': 'dqn',
|
83 |
+
'priority': False,
|
84 |
+
'priority_IS_weight': False,
|
85 |
+
'discount_factor': 0.99,
|
86 |
+
'nstep': 3,
|
87 |
+
'cfg_type': 'DQNPolicyDict',
|
88 |
+
'random_collect_size': 25000
|
89 |
+
},
|
90 |
+
'exp_name': 'LunarLander-v2-DQN',
|
91 |
+
'seed': 0,
|
92 |
+
'wandb_logger': {
|
93 |
+
'gradient_logger': True,
|
94 |
+
'video_logger': True,
|
95 |
+
'plot_logger': True,
|
96 |
+
'action_logger': True,
|
97 |
+
'return_logger': False
|
98 |
+
}
|
99 |
+
}
|