zjowowen commited on
Commit
7551156
·
1 Parent(s): e840abb

Upload policy_config.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. policy_config.py +103 -0
policy_config.py ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 'obs_shape': 8,
22
+ 'action_shape': 4,
23
+ 'encoder_hidden_size_list': [64, 64]
24
+ },
25
+ 'learn': {
26
+ 'learner': {
27
+ 'train_iterations': 1000000000,
28
+ 'dataloader': {
29
+ 'num_workers': 0
30
+ },
31
+ 'log_policy': True,
32
+ 'hook': {
33
+ 'load_ckpt_before_run': '',
34
+ 'log_show_after_iter': 100,
35
+ 'save_ckpt_after_iter': 10000,
36
+ 'save_ckpt_after_run': True
37
+ },
38
+ 'cfg_type': 'BaseLearnerDict'
39
+ },
40
+ 'update_per_collect': 10,
41
+ 'batch_size': 128,
42
+ 'learning_rate': 0.0003,
43
+ 'value_weight': 0.5,
44
+ 'entropy_weight': 0.0001,
45
+ 'discount_factor': 0.99,
46
+ 'lambda_': 0.95,
47
+ 'rho_clip_ratio': 1.0,
48
+ 'c_clip_ratio': 1.0,
49
+ 'rho_pg_clip_ratio': 1.0,
50
+ 'grad_clip_type': 'clip_norm',
51
+ 'clip_value': 5
52
+ },
53
+ 'collect': {
54
+ 'collector': {
55
+ 'collect_print_freq': 1000
56
+ },
57
+ 'n_sample': 32,
58
+ 'unroll_len': 32
59
+ },
60
+ 'eval': {
61
+ 'evaluator': {
62
+ 'eval_freq': 500,
63
+ 'render': {
64
+ 'render_freq': -1,
65
+ 'mode': 'train_iter'
66
+ },
67
+ 'figure_path': None,
68
+ 'cfg_type': 'InteractionSerialEvaluatorDict',
69
+ 'stop_value': 260,
70
+ 'n_episode': 8
71
+ }
72
+ },
73
+ 'other': {
74
+ 'replay_buffer': {
75
+ 'replay_buffer_size': 1000,
76
+ 'max_use': 16,
77
+ 'sliced': True
78
+ }
79
+ },
80
+ 'on_policy': False,
81
+ 'cuda': True,
82
+ 'multi_gpu': False,
83
+ 'bp_update_sync': True,
84
+ 'traj_len_inf': False,
85
+ 'type': 'impala',
86
+ 'priority': False,
87
+ 'priority_IS_weight': False,
88
+ 'action_space': 'discrete',
89
+ 'unroll_len': 32,
90
+ 'transition_with_policy_data': True,
91
+ 'cfg_type': 'IMPALAPolicyDict',
92
+ 'random_collect_size': 1024
93
+ },
94
+ 'exp_name': 'LunarLander-v2-IMPALA',
95
+ 'seed': 0,
96
+ 'wandb_logger': {
97
+ 'gradient_logger': True,
98
+ 'video_logger': True,
99
+ 'plot_logger': True,
100
+ 'action_logger': True,
101
+ 'return_logger': False
102
+ }
103
+ }