Upload policy_config.py with huggingface_hub
Browse files- policy_config.py +97 -0
policy_config.py
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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': 30000,
|
14 |
+
'n_evaluator_episode': 8,
|
15 |
+
'env_id': 'QbertNoFrameskip-v4',
|
16 |
+
'collector_env_num': 8,
|
17 |
+
'evaluator_env_num': 8,
|
18 |
+
'fram_stack': 4
|
19 |
+
},
|
20 |
+
'policy': {
|
21 |
+
'model': {
|
22 |
+
'encoder_hidden_size_list': [128, 128, 512],
|
23 |
+
'obs_shape': [4, 84, 84],
|
24 |
+
'action_shape': 6
|
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': 32,
|
43 |
+
'learning_rate': 0.0001,
|
44 |
+
'target_update_freq': 500,
|
45 |
+
'target_theta': 0.005,
|
46 |
+
'ignore_done': False
|
47 |
+
},
|
48 |
+
'collect': {
|
49 |
+
'collector': {},
|
50 |
+
'n_sample': 100,
|
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 |
+
'cfg_type': 'InteractionSerialEvaluatorDict',
|
61 |
+
'stop_value': 30000,
|
62 |
+
'n_episode': 8
|
63 |
+
}
|
64 |
+
},
|
65 |
+
'other': {
|
66 |
+
'replay_buffer': {
|
67 |
+
'replay_buffer_size': 400000
|
68 |
+
},
|
69 |
+
'eps': {
|
70 |
+
'type': 'exp',
|
71 |
+
'start': 1.0,
|
72 |
+
'end': 0.05,
|
73 |
+
'decay': 1000000
|
74 |
+
}
|
75 |
+
},
|
76 |
+
'on_policy': False,
|
77 |
+
'cuda': True,
|
78 |
+
'multi_gpu': False,
|
79 |
+
'bp_update_sync': True,
|
80 |
+
'traj_len_inf': False,
|
81 |
+
'type': 'dqn',
|
82 |
+
'priority': False,
|
83 |
+
'priority_IS_weight': False,
|
84 |
+
'discount_factor': 0.99,
|
85 |
+
'nstep': 3,
|
86 |
+
'cfg_type': 'DQNPolicyDict'
|
87 |
+
},
|
88 |
+
'exp_name': 'QbertNoFrameskip-v4-DQN',
|
89 |
+
'seed': 0,
|
90 |
+
'wandb_logger': {
|
91 |
+
'gradient_logger': True,
|
92 |
+
'video_logger': True,
|
93 |
+
'plot_logger': True,
|
94 |
+
'action_logger': True,
|
95 |
+
'return_logger': False
|
96 |
+
}
|
97 |
+
}
|